How come a clock on a PC is always correct after you turn it off and on?

If you turn off a computer and turn it back on after a (long) time, the clock is at the correct time. How did that happen?

Asker: Kristof, 14 years old

Answer

A computer simply has a small battery that keeps the clock (Real Time Clock or RTC) running when the computer is turned off. When you turn on the computer again, the value of the RTC is requested.

There are also ways a computer can find out the correct time from the outside. With the Network Time Protocol, for example, the time can be requested from a time server on the Internet. Every GPS satellite contains an atomic clock, so a GPS receiver also knows what time it is.

Since your question wasn’t really about the concept of time I won’t go into too much detail about the accuracy of these methods, but both timekeeping by a clock and sending time from a clock there are errors.

An RTC is often a quartz clock, just like many wristwatches. A deviation of one second per day is certainly not uncommon (depending on all kinds of factors such as quality, temperature, possible compensation systems,…).

With NTP, the accuracy depends on the network, in the case of the internet you have to think of a deviation of a few tens of milliseconds, with GPS we talk about less than a microsecond.

Answered by

Gerben Dierick

How come a clock on a PC is always correct after you turn it off and on?

Catholic University of Leuven
Abbey of Park 9 B-3001 Heverlee
http://www.khleuven.be/

.

Recent Articles

Related Stories