Skip to main content

Questions about the timekeeping mechanisms on Unix/Linux systems and/or interaction with the on-board hardware clock. Questions on the use of network time protocols should use the respective tags for those instead, unless they also involve the system's hardware clock. Not to be used for questions on the CPU's clock oscillator frequency (aka "overclocking").

Computers have different hardware- and software-based means of keeping and managing the system time.

Most servers and desktop PCs have a battery-buffered real-time clock chip which continues to keep track of absolute date and time even if the system is powered off. Once the system boots, this time is loaded into the kernel's timekeeping architecture, which provides interfaces for programs to access

  • the absolute date and time (also referred to as "wall-clock time"), which is not monotonic as it is affected by adjustments due to leap-seconds and daylight-saving time
  • various timestamp counters that count elapsed time since some more or less well-defined moment in history, and are usually monotonic

The kernel's timekeeping can be improved by synchronizing system time to a high-accuracy time source, ither using a hardware receiver for time signal broadcasts (e.g. a GPS receiver) or via network protocols that query time from a national or international time standard.

Some embedded systems (such as the Rasbperry PI) do not have a real-time clock chip and rely entirely on external time sources for accurate wall-time clock, which will be lost once the computer is powered down.

External links

Related tags

  • and : network protocols for synchronizing a computer's local time to a high-accuracy time server