Explain keypress sleep debouncing in hybernateDisplayLoop
This commit is contained in:
parent
fbcb69a855
commit
9747cfe33b
@ -92,6 +92,8 @@ func (af *AfterLock) hybernateDisplayLoop() {
|
|||||||
af.suspendDisplay()
|
af.suspendDisplay()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoid suspending the display while typing:
|
||||||
|
// sleep until no keys were pressed for LoopDelay seconds
|
||||||
for {
|
for {
|
||||||
time.Sleep(time.Duration(af.LoopDelay) * time.Second)
|
time.Sleep(time.Duration(af.LoopDelay) * time.Second)
|
||||||
if !af.screenLocked() {
|
if !af.screenLocked() {
|
||||||
|
Loading…
Reference in New Issue
Block a user