Преглед изворни кода

Use `Environment.TickCount64` instead of `DateTimeOffset.UtcNow.ToUnixTimeSeconds()`

Dragon пре 3 година
родитељ
комит
fad7f8efd4
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      HuntBuddy/Ipc/TeleportConsumer.cs

+ 2 - 2
HuntBuddy/Ipc/TeleportConsumer.cs

@@ -13,7 +13,7 @@ namespace HuntBuddy.Ipc
 		{
 			get
 			{
-				if (this.timeSinceLastCheck + 5 > DateTimeOffset.UtcNow.ToUnixTimeSeconds())
+				if (this.timeSinceLastCheck + 5000 > Environment.TickCount64)
 				{
 					return this.isAvailable;
 				}
@@ -22,7 +22,7 @@ namespace HuntBuddy.Ipc
 				{
 					this.consumerMessageSetting.InvokeFunc();
 					this.isAvailable = true;
-					this.timeSinceLastCheck = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
+					this.timeSinceLastCheck = Environment.TickCount64;
 				}
 				catch
 				{