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
21
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
21
votes
1 answer

Android AnalogClock : setting drawables programmatically

I'm making an analog clock app which has around 15 designs in one app. One way of setting the designs would be to create different widgetconfigs.XML for each design but that'll clutter up devices running 4.0+. I also thought of setting up an…
QuantumFoam
  • 313
  • 1
  • 6
21
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
  • 32,209
  • 23
  • 76
  • 99
20
votes
3 answers

Faking time without changing Windows system clock

Does anybody know of a Windows tool to report fake dates/times to a process? Apparently there are Linux programs that can be used to test how the software will react in the future / in a different timezone or to trigger scheduled tasks without…
Ishmaeel
  • 14,138
  • 9
  • 71
  • 83
20
votes
9 answers

Synchronization (of clocks) between two remote computers

I'm looking into writing a simple synchronization ability into my app and one of the concerns that has popped up is synchronization of time between two remote computers, each with their own clock (in particular concerning the modification dates of…
devios1
  • 36,899
  • 45
  • 162
  • 260
20
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
  • 517
  • 2
  • 8
  • 16
20
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,147
  • 9
  • 26
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
  • 6,328
  • 3
  • 30
  • 58
18
votes
3 answers

How can I format a timestamp in Perl?

I would like to get this timestamps formatting: 01/13/2010 20:42:03 - - Where it's always 2 digits for the number except for the year, where it's 4 digits. And it's based on a 24-hour clock. How can I do this in Perl? I prefer native functions.
Brian
  • 191
  • 1
  • 1
  • 4
18
votes
4 answers

How to deal with the amazon ec2's clock drift?

We have a couple of ec2 instances on amazon, and we used amazon AIM Linux to set up. The instance type is m1.medium. Everything is going well until this week. We found from log file that there would be a huge clock drift happened suddenly, and…
user2028644
  • 181
  • 1
  • 1
  • 3
17
votes
6 answers

The C `clock()` function just returns a zero

The C clock() function just returns me a zero. I tried using different types, with no improvement... Is this a good way to measure time with good precision? #include #include int main() { clock_t start, end; double…
Pietro
  • 12,086
  • 26
  • 100
  • 193
16
votes
1 answer

What is the acpi_pm linux clocksource used for, what hardware implements it?

The file /sys/devices/system/clocksource/clocksource0/available_clocksource in my Linux box lists the following clock sources: tsc hpet acpi_pm I know that tsc is the Timestamp Counter Register in the Processer. I know the hpet is the High…
user460880
  • 349
  • 2
  • 3
  • 7
16
votes
5 answers

Java bug in sleep() when changing OS time : any workaround?

The bug that annoys me is the same than this ticket. Basically, if you change the OS clock to a date in the past, all the thread that were sleeping at the time of the change won't wake up. The application I am developping is meant to be running…
barjak
  • 10,842
  • 3
  • 33
  • 47
16
votes
1 answer

STM32 internal clocks

I am confused with the clock system on my STM32F7 device (Cortex-M7 microcontroller from STMicroelectronics). The reference manual does not clarify the differences between these clocks sufficiently: SYSCLK HCLK FCLK The reference manual reads in…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
16
votes
1 answer

Celery --beat on Heroku vs Worker and Clock processes

Blockquote I have a periodic task that I am implementing on heroku procfile using worker: Procfile web: gunicorn voltbe2.wsgi --log-file - --log-level debug worker: celery -A voltbe2 worker --beat --events --loglevel INFO tasks.py class…
dowjones123
  • 3,695
  • 5
  • 40
  • 83