From 16aaa45b728d790593ae754cd3544d411336f2af Mon Sep 17 00:00:00 2001 From: Jeff Leung Date: Wed, 8 Jul 2020 15:51:35 -0700 Subject: [PATCH] Use static method instead of making it look worse --- MFACodeGenerator/Program.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MFACodeGenerator/Program.cs b/MFACodeGenerator/Program.cs index 664756d..c59a81d 100644 --- a/MFACodeGenerator/Program.cs +++ b/MFACodeGenerator/Program.cs @@ -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) {