Basic recipes
Start here when you need a single lifecycle or a display-only timer.
Core only
- Wall clock: use
timer.nowand format theDatein your app. - Stopwatch: use
elapsedMillisecondsfor active elapsed time. - Absolute countdown: derive remaining time from
expiresAt - timer.now. - Manual controls: wire
start,pause,resume,reset,restart, andcancel.
Core + duration
- Pausable countdown: use
elapsedMillisecondsanddurationParts()for display math. - OTP resend cooldown: enable a resend button after a 15 second local cooldown.