Skip to content

Commit

Permalink
fix(core): fix timers for rust layouts
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
mmilata committed Mar 4, 2022
1 parent 2fd0e8a commit 33fda8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/trezor/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def schedule(
) -> None:
"""
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
and correct concept.
Expand Down Expand Up @@ -582,5 +582,6 @@ def handle(self, task: Task) -> None:
self.task = task

def schedule(self, deadline: int, value: Any) -> None:
deadline = utime.ticks_add(utime.ticks_ms(), deadline)
if self.task is not None:
schedule(self.task, value, deadline)

0 comments on commit 33fda8e

Please sign in to comment.