Use static method instead of making it look worse

This commit is contained in:
Jeff Leung 2020-07-08 15:51:35 -07:00
parent 73c6317b3e
commit 16aaa45b72
1 changed files with 2 additions and 5 deletions

View File

@ -17,11 +17,8 @@ namespace MFACodeGenerator
{ {
try try
{ {
NtpClient.NtpConnection client var diff = NtpConnection.Utc() -
= new NtpConnection("pool.ntp.org"); DateTime.UtcNow;
var NetDate = client.GetUtc();
var diff = NetDate - DateTime.UtcNow;
if (Math.Abs(diff.Seconds) >= 60) if (Math.Abs(diff.Seconds) >= 60)
{ {