Explain keypress sleep debouncing in hybernateDisplayLoop

This commit is contained in:
Kristóf Tóth 2020-09-08 16:14:34 +02:00
parent fbcb69a855
commit 9747cfe33b

View File

@ -92,6 +92,8 @@ func (af *AfterLock) hybernateDisplayLoop() {
af.suspendDisplay()
}
// avoid suspending the display while typing:
// sleep until no keys were pressed for LoopDelay seconds
for {
time.Sleep(time.Duration(af.LoopDelay) * time.Second)
if !af.screenLocked() {