How does a program know actually what a second is?

591 views

So if a program needs to wait 10 seconds for something, how it is actually calculating it if the processors speed continously changes? (And i’m talking about offline programs that does not use NTP)

In: 361

20 Answers

Anonymous 0 Comments

All computers (and most electronics) have a built-in clock. It’s a tiny crystal that vibrates when you put electricity through it, like ticks of an old-timey mechanical clock. There’s a bit of electronics that counts the ticks to keep time. The computer can read the time from the clock, and programs can “set an alarm” to let know when number of ticks has passed or the clock is at a certain time.

You are viewing 1 out of 20 answers, click here to view all answers.