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
0 answers

My Digital clock wont change from AM to PM

I'm trying to make my digital clock change from AM to PM when it needs too. But it will only stay on AM even when it should be on PM. And it needs to be the same time as the time set on the computer. Care to help? Thanks guys, here's my code…
0
votes
3 answers

Get current time on time change

I'm having following code to show the current time: static void Main(string[] args) { while (true) { ShowDate(GetTime(),GetDate()); //Here's my issue: System.Threading.Thread.Sleep(1000); } } //Clear Console and…
Damien Flury
  • 769
  • 10
  • 23
0
votes
1 answer

Generating 2 clock pulses in VHDL

Although I have completed a university course in digital logic, I am new to VHDL design and I am hoping if someone can help me create 2 clock signals which depend on the state of one another. I am using a 50 MHz clock on a DE2-115 FPGA board that…
MrMuffins
  • 25
  • 1
  • 7
0
votes
0 answers

Synchronize the time setting of my laptop with the time shown in a website with millisecond accuracy

I have this problem that the time setting of my laptop does not match the one of a website with millisecond accuracy. Also, I do not know which server that website gets its time setting from. Is there any way to synchronize my laptop with the time…
0
votes
5 answers

How to record elaspsed wall time in C?

I'm trying to record the time my program takes to finish in seconds, with sub-second accuracy. I'm not recording CPU time or cycles, I simply want to be able to mark a start point (Wall Clock time), then at the end of my program mark a finish (Wall…
Breeduss
  • 29
  • 1
  • 3
0
votes
2 answers

SAMD21 clock configuration

I'm trying to configure my SAMD21 clock to go as fast as it can. So I'm using the internal 8 MHz oscillator to feed generic clock generator 1 (with a prescaler of 8) to generate a generic clock to feed the digital phase locked loop, which in turn…
Luca
  • 1,658
  • 4
  • 20
  • 41
0
votes
1 answer

Does linux "clock()" function count in "sleep" time of a process?

I called "sleep" functions, but seems not really counted, like this: #include #include #include using namespace std; int main(){ clock_t t1=clock(); sleep(2); clock_t t2=clock(); cout<
Troskyvs
  • 7,537
  • 7
  • 47
  • 115
0
votes
1 answer

php date.timezone problem

i am storing member's created date using the time() function, and echo them back using strftime() and the date() function, but it doesnt display the right time information my code is : date("d-m-Y H:i:s",…
littlechad
  • 1,202
  • 17
  • 48
0
votes
1 answer

Suggestions for making a 12-hour/24-hour alarm clock using Spinners?

I have 3 JSpinners, one for hours, one for minutes, one for seconds. The minutes and seconds have a max of 60 and a min of -1 and the hours one has a min of -1 and a max of 24. If the second one hits 60, it flips back to 0 and increases the minutes…
Ky -
  • 30,724
  • 51
  • 192
  • 308
0
votes
2 answers

Code performance strick measurement

I’m creating performance framework tool for measuring individual message processing time in CentOS 7. I reserved one CPU for this task with isolcpus kernel option and I run it using taskset. Ok, now the problem. I trying to measure the max…
Pawel Faron
  • 312
  • 2
  • 9
0
votes
2 answers

How clock speed of devices determined?

How the hardware designer determined the suitable frequency of the clock for the device to work on? After which he/she created the timing diagram which is then further used for interfacing. All I need to know what is the mechanism for determining…
0
votes
1 answer

Discrete Event Simulation Time Unit in Java

I am working on a discrete event simulation in Java, the code related the time is below; class Event implements Runnable, Comparable { double time; Runnable runnable; Event(double time, Runnable aRunnable) { this.time = time; …
Dudu OK
  • 3
  • 5
0
votes
1 answer

Python Alarm Clock code issue for raspberry pi project

I've written this code for an the alarm clock portion of a project I am working on (coffee brewing alarm clock). When I run the program it either just skips to the "yikes..." portion or returns the error AttributeError: 'str' object has no…
0
votes
0 answers

How to cancelLocalNotification When app is in the background And I don't do anything

Thank You in advance Xcode 7.3 ,oc Now I'm using the LocalNotification to make an alarm clock .I ran into a problem and consulted a lot of people who didn't get the answer .When I receive a LocalNotification, app is in the background, And I don't…
0
votes
1 answer

Interval indicators on a Circular face

I'm attempting to put interval indicators on a circle, much like what you would find on a timer or clock. import pygame from pygame.locals import * import math SCREENWIDTH = 400 SCREENHEIGHT = 400 BACKGROUND = (0, 0, 0) FPS = 60 clock =…
Khari Thompson
  • 99
  • 1
  • 10