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

1897 questions
24
votes
6 answers

How to check HZ in the terminal?

I have seen this http://kaasxxx.wordpress.com/2008/01/22/linux-hz-checker/ But the script seems not to work. Does anyway know an easy way to check "HZ" in the terminal in Linux?
Hao Shen
  • 2,257
  • 2
  • 32
  • 60
24
votes
8 answers

Adding "0" if clock have one digit

i have some clock script. Everything is fine and it's work perfectly but... i have one problem. If at the clock is set one digit hour or minute like 1:5 clock not adding "0" digit before. This what i'v done but it does't work. Can u help me, much…
Lukas
  • 6,464
  • 16
  • 61
  • 114
23
votes
5 answers

Time since first boot up

I'm developing an android application and hit the problem with determining system first boot up time. I mean i need to measure how much time already passed from device first boot up. I know about solution with listening for ACTION_BOOT_COMPLETED and…
user2857033
  • 339
  • 4
  • 6
22
votes
6 answers

Android: How do I display an updating clock in a TextView

have a clock I want to display in a TextView. I would have thought there was a few nice functions to do this, but I couldn't find anything. I ended up implementing my own way that uses a Handler. What I'm asking though, is there a better (more…
Richard Rout
  • 1,246
  • 1
  • 16
  • 28
22
votes
6 answers

Listing of manufacturer's clock / alarm package and class name, Please add

THis is not really a question, Sorry. I just wanted help on getting the package and class names of alarm and clocks of different android makers' clock and alarm. I have a listing here of HTC, Samsung, and stock android class names. But you can guess…
KITT
  • 230
  • 2
  • 3
  • 15
22
votes
3 answers

Monotonic clock on OSX

CLOCK_MONOTONIC does not seem available, so clock_gettime is out. I've read in some places that mach_absolute_time() might be the right way to go, but after reading that it was a 'cpu dependent value', it instantly made me wonder if it is using…
Brett
  • 3,825
  • 7
  • 29
  • 48
21
votes
3 answers

How to resynchronize with chrony?

I am looking for an equivalent of 'ntpdate IPaddress' command in the chrony suite to force chronyd to synchronize time right now.
Nfernandez
  • 375
  • 1
  • 2
  • 11
21
votes
4 answers

How accurate is the GPS Clock?

In my company we do have critical systems that require an accurate time. As so, we have an NTP server appliance with an outdoor GPS antenna that receives the time from the GPS satellites. My questions are: How accurate is the time clock? Is it…
Andre
  • 519
  • 1
  • 5
  • 12
20
votes
4 answers

How to solve error: "Clock skew detected"?

I am uploading my OpenCL and Cuda code to hgpu.org because I don't have a graphics card on my laptop. When I upload my code I get the following error: make: Warning: File `main.cu' has modification time 381 s in the future make: warning: Clock skew…
zindarod
  • 5,532
  • 2
  • 23
  • 50
20
votes
11 answers

How can I resolve the drifting clock for my Virtual Machine?

My Virtual Machine's clock drifts pretty significantly. There's documentation out there about dealing with this, but nothing seems to be working very well. Anyone have any suggestions, things that worked well for them, ... Supposedly updating…
carrier
  • 29,579
  • 22
  • 74
  • 99
19
votes
5 answers

Detect current CPU Clock Speed Programmatically on OS X?

I just bought a nifty MBA 13" Core i7. I'm told the CPU speed varies automatically, and pretty wildly, too. I'd really like to be able to monitor this with a simple app. Are there any Cocoa or C calls to find the current clock speed, without…
Tim
  • 14,221
  • 6
  • 37
  • 62
19
votes
8 answers

Intent to launch the clock application on android

I am facing a problem with a clock widget i made. I want the user to touch the clock and launch the clock app on the phone. this is the code: //this worked on my nexus 2.1 if(VERSION.SDK.equals("7")){ RemoteViews views = new…
John
  • 507
  • 2
  • 8
  • 16
19
votes
7 answers

Detect with javascript if user's machine is using 12 hour clock (am/pm) or 24 clock (military time)

Is it possible to detect if user's machine is using 12 hour clock (am/pm) or 24 hour clock (military time)? One way would be to check users locales, but then it is just massive list of locale comparison and someone from U.S who wants 12 hour clock…
Badr Hari
  • 7,255
  • 17
  • 60
  • 97
19
votes
3 answers

real time app icon like iOS 7 clock

I saw clock app in iOS 7. Its app icon shows time on the icon itself. User don't even have to peep inside the icon to see the time. How to achieve this ?
parilogic
  • 1,113
  • 9
  • 25
18
votes
3 answers

DateTime Flutter

How do I implement the current time into Text format? I feel like it should be fairly simple but struggling to do so. Basic example;
Tom O'Sullivan
  • 1,841
  • 5
  • 9
  • 21