Use static method instead of making it look worse
This commit is contained in:
parent
73c6317b3e
commit
16aaa45b72
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue