ngui: yield CPU during standby mode
ci/woodpecker/push/woodpecker Pipeline was successful Details

when the screen turns off, the idle loop never gave a chance CPU to
do other work and pegged at 100%. adding a short sleep each cycle
yields CPU to the OS.

closes #15
pull/20/head
alex 2 years ago
parent fd49235f9e
commit ad8cdf727b
Signed by: x1ddos
GPG Key ID: FDEFB4A63CBD8460

@ -30,6 +30,7 @@ pub fn sleep(wake: *const Thread.ResetEvent) void {
return;
}
std.atomic.spinLoopHint();
std.time.sleep(10 * std.time.ns_per_ms);
}
}