From 3253fe523f2caeeef866e35609bc4562cdce48a9 Mon Sep 17 00:00:00 2001 From: opl- Date: Wed, 3 Jun 2020 20:10:17 +0200 Subject: [PATCH] Simplify Plugin.GetCurrentTime Co-authored-by: Eris --- BeatSaberHTTPStatus/Plugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeatSaberHTTPStatus/Plugin.cs b/BeatSaberHTTPStatus/Plugin.cs index bdb9e46..221b142 100644 --- a/BeatSaberHTTPStatus/Plugin.cs +++ b/BeatSaberHTTPStatus/Plugin.cs @@ -494,7 +494,7 @@ public void OnBeatmapEventDidTrigger(BeatmapEventData beatmapEventData) { } public static long GetCurrentTime() { - return (long) (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).Ticks / TimeSpan.TicksPerMillisecond); + return DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); } public class PluginTickerScript : PersistentSingleton {