Skip to content
Simple NTP (SNTP) client library providing .NET applications with accurate network time
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GuerrillaNtp
GuerrillaNtpTests
NtpCommand
.hgignore
.hgtags
GuerrillaNtp.sln
LICENSE
NOTICE
README.md

README.md

GuerrillaNtp

GuerrillaNtp is a simple NTP (SNTP) client written in C# that can be embedded in desktop .NET applications to provide them with accurate network time even when the system clock is unsynchronized.

// query the SNTP server
TimeSpan offset;
using (var ntp = new NtpClient(Dns.GetHostAddresses("pool.ntp.org")[0]))
    offset = ntp.GetCorrectionOffset();

// use the offset throughout your app
var accurateTime = DateTime.UtcNow + offset;
  • Homepage - Overview, download, tutorial, alternatives, contact.
  • Documentation - API reference documentation.
  • Sources - Primary repository, preferred for pull requests.
  • License - Distributed under Apache License 2.0.
You can’t perform that action at this time.