Fix for wake timer timing issues

This commit is contained in:
Liza 2024-04-14 13:17:30 +02:00
parent d6ba65e939
commit f868fd423d
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -16,6 +16,7 @@ public class SleepCtrl
bool suspended = NativeMethods.SetSuspendState(false, false, false);
if (suspended)
{
dt = dt.AddSeconds(-5);
if (DateTime.Now < dt)
{
Console.WriteLine($"[{DateTime.Now}] Resumed from suspend, but expected to sleep until {dt} => deactivating sleep");