mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
const_delay: remove
This commit is contained in:
parent
e937afcce8
commit
c422453e82
@ -1,12 +0,0 @@
|
||||
import utime
|
||||
|
||||
class ConstDelay:
|
||||
def __init__(self, delay):
|
||||
self.delay = delay
|
||||
self.last_run = utime.ticks_us()
|
||||
|
||||
def wait(self):
|
||||
# FIXME - use loop.call_at instead of call_later to avoid multiple time handling
|
||||
delay = 2 * self.delay - (utime.ticks_us() - self.last_run)
|
||||
self.last_run = utime.ticks_us()
|
||||
return delay
|
Loading…
Reference in New Issue
Block a user