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
|
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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue