Maintaining Precise Time on Your Computers
| By Richard N Williams
All PC’s and networking devices use clocks to maintain an internal system time. These clocks, called Real Time Clock chips (RTC) provide time and date information. The chips are battery backed so that even during power outages, they can maintain time. However, personal computers are not designed to be perfect clocks, their design has been optimized for mass production and low-cost rather than maintaining accurate time.
These internal clocks are prone to drift and although for many application this can be quite adequate, often machines need to work together on a network and if the computers drift at different rates the computers will become out of sync with each other and problems can arise particularly with time sensitive transactions.
Network Time Protocol (NTP) is one of the Internet’s oldest protocols still used, invented by Dr David Mills from the University of Delaware, it has been in utilized since 1985. NTP is a protocol designed to synchronize the clocks on computers and networks across the Internet or Local Area Networks (LANs).
NTP (version 4) can maintain time over the public Internet to within 10 milliseconds (1/100th of a second) and can perform even better over LANs with accuracies of 200 microseconds (1/5000th of a second) under ideal conditions.
NTP works within the TCP/IP suite and relies on UDP, a less complex form of NTP exists called Simple Network Time Protocol (SNTP) that does not require the storing of information about previous communications, needed by NTP. It is used in some devices and applications where high accuracy timing is not as important.
Many operating systems including Windows, UNIX and LINUX can utilize NTP and SNTP and time synchronisation with NTP is relatively simple, it synchronises time with reference to a reliable clock source. This source could be relative (a computer’s internal clock or the time on a wrist-watch) or absolute (A UTC – Universal Coordinated Time – clock source that is accurate as is humanely possible).
All Microsoft Windows versions since 2000 include the Windows Time Service (w32time.exe) which has the ability to synchronise the computer clock to an NTP server.
There are a large number of Internet hosted NTP servers that synchronise with external UTC references such as time.nist.gov or ntp.my-inbox.co.uk but it must be noted that Microsoft and others recommend that an external source is used to synchronise your machines, as Internet based references can’t be authenticated. Specialist NTP time servers are available that can synchronise time on networks using either the MSF (or equivalent) or GPS signal.
The most widely used are the GPS time servers which use the GPS system to relay accurate time. The GPS system consists of a number of satellites providing accurate positioning and location information. Each GPS satellite can only do this by utilising an atomic clock which in turn can be can be used as a timing reference.
A typical GPS receiver can provide timing information to within a few nanoseconds of UTC as long as there is an antenna situated with a good view of the sky.
There are a number of national time and frequency radio transmissions that can be used to synchronise a NTP server. In Britain the signal (called MSF) is broadcast by the National Physics Laboratory in Cumbria which serves as the United Kingdom’s national time reference, there are also similar systems in Colorado, US (WWVB) and in Frankfurt, Germany (DCF-77). These signals provides UTC time to an accuracy of 100 microseconds, however, the radio signal has a finite range and is vulnerable to interference.