SNTP Client

(8,125 Views)

Simple Network Time Protocol Client 

Quick Facts

Version: 1.0
Platform: .NET Framework 2.0
Download: Click here to download the latest version.

This is a free C# and VB .NET implementation of the SNTP, as documented in the RFC 2030. Feel free to download it and enjoy. There are no restrictions on how you use the code provided herein, except a short notice to the author.

The Simple Network Time Protocol (SNTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. SNTP uses UDP port 123 as its transport layer. It is designed particularly to
resist the effects of variable latency. SNTP uses  Marzullo’s algorithm with the UTC time scale, including support for features such as leap seconds. SNTPv4 can usually maintain time to within 10 milliseconds
(1/100 s) over the Internet, and can achieve accuracies of 200 microseconds (1/5000 s) or better in local area networks under ideal conditions.

SNTP is one of the oldest internet protocols still in use (since before 1985). SNTP was originally designed by
Dave Mills
of the University of Delaware, who still maintains it, along with a team of volunteers.

SNTP uses a hierarchical system of “clock strata”, where stratum 1 systems are synchronized to an accurate external clock such as a GPS clock or other radio clock. SNTP stratum 2 systems derive their time from one or more stratum 1
systems, and so on. (Note that this is different from the notion of clock strata used in telecom systems)

The 64-bit timestamps used by SNTP consist of a 32-bit seconds part and a 32-bit fractional second part, giving SNTP a time scale of 232 seconds (136 years), with a theoretical resolution of 2−32 seconds (0.233 nanoseconds). Although the SNTP timescale wraps round every 232 seconds, implementations should disambiguate SNTP time using a knowledge of the approximate time from other sources. Since this only requires time accurate to a few decades, this is not a problem in general use.