From a256158f89530761791cfd205bd9535258fbd475 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 11 Mar 2019 20:41:49 +0000 Subject: [PATCH] Tweak Task.Delay() to fix odd issue --- RhinoReminds/ClientListener.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RhinoReminds/ClientListener.cs b/RhinoReminds/ClientListener.cs index 6ead432..a8c4fef 100644 --- a/RhinoReminds/ClientListener.cs +++ b/RhinoReminds/ClientListener.cs @@ -347,7 +347,7 @@ namespace RhinoReminds if (DateTime.Now < nextReminder.Time) { Console.WriteLine($"[Rhino/Reminderd] Sleeping for {nextWaitingTime}"); - await Task.Delay(nextWaitingTime, reminderWatcherResetToken); + await Task.Delay((int)Math.Ceiling(Math.Abs(nextWaitingTime.TotalMilliseconds)), reminderWatcherResetToken); } } else {