1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

Fixed API (wait() returns number, not Sleep object)

This commit is contained in:
slush0 2016-05-05 20:17:29 +02:00 committed by Pavol Rusnak
parent e382737fda
commit 561b82a5be
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1,4 +1,3 @@
from trezor.loop import Sleep
import utime import utime
class ConstDelay: class ConstDelay:
@ -10,4 +9,4 @@ class ConstDelay:
# FIXME - use loop.call_at instead of call_later to avoid multiple time handling # FIXME - use loop.call_at instead of call_later to avoid multiple time handling
delay = 2 * self.delay - (utime.ticks_us() - self.last_run) delay = 2 * self.delay - (utime.ticks_us() - self.last_run)
self.last_run = utime.ticks_us() self.last_run = utime.ticks_us()
return Sleep(delay) return delay