Questions tagged [clock]

Hardware and system clocks used by drivers, OS and hardware languages.

Clocks are key to controlling synchronous logic and are used by drivers, and OS software. As well, hardware languages, such as and can make extensive use of clocks. CPU or system clocks are familiar to most developers, but a typical computer can contain many different clocks to control different hardware functions such as video, audio, RAM, buses, etc. Familiar current time functions are often derived from a hardware clock which produces interrupts allowing an OS to keep a running time count by recording the interrupt; sometimes called ticks or jiffies.

Related tags

  • - obtaining, formatting times and other uses.
  • - program issues dealing with dates.
  • - measuring execution time with a clock.

See also: PLL, Clock divider

2060 questions
0
votes
1 answer

Rails clock display

I have an application that needs to display a clock on the index page. So I have a static controller like this: controllers/static_controller.rb: class StaticController < ApplicationController def index @time = Time.now.strftime("%H:%M:%S ") …
Luiz Henrique
  • 877
  • 8
  • 25
0
votes
1 answer

Trying to make a dynamic (changing) countdown timer while inputting other text?

So I've managed to make the countdown clock in which changes the console text only by flushing out the line using "\r" end = 120; for (end; end >=0; end--){ printf("\r"); int num = end / 60; int nums = end % 60; printf(" %d : %.2d…
Alex
  • 17
  • 4
0
votes
2 answers

How can I generate a stopwatch/countdown with the following code in C++?

I'm trying to create a timer function that prints a timer of 2 minutes (in M:S form) that ticks down by itself. I have the following code: void startTimer(){ srand(time(0)); clock_t start_t, end_t; clock_t start = clock(); …
Alex
  • 17
  • 4
0
votes
1 answer

gimp text on a dial placed at specific locations (degrees)

I have a (circular) dial. I would like to place text centered at a specific angle on the dial. A simple analogy would be a clock face with text above each hour mark. I can write text along an arc, placing text at the top (12h) position, then rotate…
daytooner
  • 55
  • 1
  • 7
0
votes
1 answer

Quartus 12 Hours Clock (Synchronous)

I'm trying to build a 12 hour clock in Quartus using multiple LPM counters, with the requirement that it be run synchronously, with all lpm counters being driving by a single clock source. I put together a BDF with two counters to test out the…
oldmanB
  • 1
  • 2
0
votes
1 answer

How to set internal wall clock in a Fortran program?

I use Fortran to do some scientific computation. I use HPC. As we know, when we submit jobs in a HPC job scheduler, we also specify the wall clock time limit for our jobs. However, when the time is up, if the job is still writing output data, it…
zlin
  • 195
  • 2
  • 11
0
votes
2 answers

How to display running time from different time zones on the same page

I am able to display and run the current time in my time zone PST - (US/Los Angeles) and I am also able to display EST - (US/New York). My problem is that while my current time shows the seconds running the time in the different time zone only shows…
0
votes
1 answer

I want to connect my Android bus app to the clock?

Okay, so I am developing a bus app that gives you the next bus on your station. On one activity I have all the buses and their times, and I just want to highlight the next bus, using the clock from the phone of the user? Is this possible?
angelazaff
  • 23
  • 4
0
votes
1 answer

How to set time on android analog clock component?

i was trying to write an analog world clock app. i wanted to use the analog clock component This shows the system time. But how do we set a different time(say, a second clock showing time for a…
Arjun
  • 3
  • 1
  • 2
0
votes
1 answer

Accurate timer using python time [on the microseconds level]

I want to create trigger that runs something every 500 ms, and it should be without drifting over time. I have this code running to show something in pyopengl def __init__(self): ... self.t_on = time.clock() ... def display_gl(self): …
zixmarkiz
  • 13
  • 5
0
votes
1 answer

Add MIDI Events to Clock - Java

I am creating a simple MIDI application in C# with an open source library that allows the user to specify a channel, pitch and velocity and add them to a Clock. This clock can then play all the notes in the sequence that they were added. Everything…
Jamie Keeling
  • 9,806
  • 17
  • 65
  • 102
0
votes
1 answer

Vhdl process statements not getting updated for change in clock(sensitivity list)

I have the following code. Here I am trying to bubble sort the values of an array acoording to their index . After bubblesorting in first set of for loops , i am using second set of for loops to get the original indeces of the values which are…
0
votes
1 answer

raspberry pi 3 b clock problems using .tv_usec

code works fine when .tv_usec is replaced with .tv_sec need more accuracy seconds to at lest to decimal points wording if this my be an issue with the pis clock code eventually to be used to calculate bpm but currently used to calculate time…
0
votes
1 answer

How to make dynamic response clock in android?

So im working on a app and i need to make a circle (clock) that when i move clock indicators changes some values. The idea is when i move the indicator with a finger the clock changes. There is an example in the link bellow: Example here Thanks!!
0
votes
1 answer

Data argument not used by format string - Outputting long

Okay, this is a C program... and I get this issue even though I have it properly placed. long ms and in the print I have "l". Now, x is a global int variable that user enters through commandline argument and x then atoi() the argument. This issue…