Timer
查看 MarkdownThis page lists the Python SDK names for Timers. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Python SDK API reference.
API names
| Task | Python API | Dex behavior |
|---|---|---|
| Wait for a duration | Timer.by_duration in wait_for | Firing time |
| Give the Timer a stable ID | condition_id of Timer.by_duration | AnyCombinationOf |
| Combine a Timer with other conditions | Wait.any_of, Wait.all_of, and Wait.any_combination_of | Waits |
| Check whether a Timer fired | Context.has_timer_fired in execute | Condition results |
| Make a waiting Timer ready now | Client.skip_timer, with StepExecutionId and TimerId | Skip a Timer |
Example
Example: examples/python/dex_examples/primitives/timer/timer_flow.py