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
1 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,3 @@
from trezor.loop import Sleep
import utime
class ConstDelay:
@ -10,4 +9,4 @@ class ConstDelay:
# 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 Sleep(delay)
return delay