Fix for wake timer timing issues
This commit is contained in:
parent
d6ba65e939
commit
f868fd423d
@ -16,6 +16,7 @@ public class SleepCtrl
|
|||||||
bool suspended = NativeMethods.SetSuspendState(false, false, false);
|
bool suspended = NativeMethods.SetSuspendState(false, false, false);
|
||||||
if (suspended)
|
if (suspended)
|
||||||
{
|
{
|
||||||
|
dt = dt.AddSeconds(-5);
|
||||||
if (DateTime.Now < dt)
|
if (DateTime.Now < dt)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[{DateTime.Now}] Resumed from suspend, but expected to sleep until {dt} => deactivating sleep");
|
Console.WriteLine($"[{DateTime.Now}] Resumed from suspend, but expected to sleep until {dt} => deactivating sleep");
|
||||||
|
Loading…
Reference in New Issue
Block a user