# Timers

> Timer patterns: TimelineView for smooth updates, Timer.publish for periodic ticks, countdown/stopwatch formatting. Use when implementing app features related to timers.

- Skill: `abdullah4ai/timers` (Agent Skill)
- Install (CLI): `npx skillmds@latest add abdullah4ai/timers`
- Raw SKILL.md: https://api.skillmd.com/api/skills/abdullah4ai/timers/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: abdullah4ai (https://skillmd.com/u/abdullah4ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/abdullah4ai/timers

---

# Timers

TIMERS:
- Use TimelineView(.animation) for smooth countdown/stopwatch UI
- Timer.publish(every:on:in:).autoconnect() for periodic updates
- @State private var timeRemaining: TimeInterval for countdown state
- .onReceive(timer) { _ in } to update state each tick
- Format with Duration.formatted() or custom mm:ss formatter
- Invalidate timer in .onDisappear to prevent leaks

