mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
fix(core): fix timers for rust layouts
[no changelog]
This commit is contained in:
parent
4eefaffac9
commit
45276963c0
@ -62,7 +62,7 @@ def schedule(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Schedule task to be executed with `value` on given `deadline` (in
|
Schedule task to be executed with `value` on given `deadline` (in
|
||||||
microseconds). Does not start the event loop itself, see `run`.
|
milliseconds). Does not start the event loop itself, see `run`.
|
||||||
Usually done in very low-level cases, see `race` for more user-friendly
|
Usually done in very low-level cases, see `race` for more user-friendly
|
||||||
and correct concept.
|
and correct concept.
|
||||||
|
|
||||||
@ -582,5 +582,6 @@ class Timer(Syscall):
|
|||||||
self.task = task
|
self.task = task
|
||||||
|
|
||||||
def schedule(self, deadline: int, value: Any) -> None:
|
def schedule(self, deadline: int, value: Any) -> None:
|
||||||
|
deadline = utime.ticks_add(utime.ticks_ms(), deadline)
|
||||||
if self.task is not None:
|
if self.task is not None:
|
||||||
schedule(self.task, value, deadline)
|
schedule(self.task, value, deadline)
|
||||||
|
Loading…
Reference in New Issue
Block a user