Пример #1
0
 public void SetSystemTime()
 {
     var sntpClock = new SntpClock();
     var now = sntpClock.UtcNow;
     SystemClock.Win32.SetUtc(now);
 }
Пример #2
0
 public void GetUtcNowDefault()
 {
     var clock = new SntpClock();
     var difference = DateTime.UtcNow - clock.UtcNow;
     Assert.AreEqual(0, difference.TotalMilliseconds, 1000 * 60, "System Utc clock difference with NTP clock is too large: " + difference);
 }