Timer
View as MarkdownThis page lists the TypeScript SDK names for Timers. The doc comment of each API gives its parameters, defaults, and errors. Read them in the TypeScript SDK API reference.
API names
| Task | TypeScript API | Dex behavior |
|---|---|---|
| Wait for a duration | Timer.byDuration in waitFor | Firing time |
| Give the Timer a stable ID | conditionId of Timer.byDuration | AnyCombinationOf |
| Combine a Timer with other conditions | Wait.anyOf, Wait.allOf, and Wait.anyCombinationOf | Waits |
| Check whether a Timer fired | Context.hasTimerFired in execute | Condition results |
| Make a waiting Timer ready now | Client.skipTimer, with StepExecutionId and TimerId | Skip a Timer |
Example
Example: examples/typescript/src/primitives/timer/timer-flow.ts