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
{
NtpClient.NtpConnection client
= new NtpConnection("pool.ntp.org");
var NetDate = client.GetUtc();
var diff = NetDate - DateTime.UtcNow;
var diff = NtpConnection.Utc() -
DateTime.UtcNow;
if (Math.Abs(diff.Seconds) >= 60)
{