1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

const_delay: remove

This commit is contained in:
Jan Pochyla 2017-06-12 18:02:42 +02:00
parent e937afcce8
commit c422453e82

View File

@ -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