Files
Charles Wiltgen 08d251e17e fix(axiom-integration): replace fabricated Clock.timer API with AsyncTimerSequence
ContinuousClock().timer(interval:) does not exist — compile-verified
against the SDK. AsyncTimerSequence ships in swift-async-algorithms,
not the standard library; examples now import AsyncAlgorithms and the
section states the package dependency, iOS 16 floors, and that
.repeating(every:) defaults to SuspendingClock (corroborated against
the package source). Companion reference docs page carried the same
phantom API in its Example Prompts and What's Covered index — fixed.
2026-07-23 11:19:46 -07:00

2.0 KiB
Raw Permalink Blame History

Timer Patterns Reference

Complete API reference for iOS timer mechanisms — Timer, DispatchSourceTimer, Combine Timer.publish, AsyncTimerSequence, and Task.sleep.

When to Use This Reference

Use this reference when:

  • Looking up specific timer API syntax or parameters
  • Understanding DispatchSourceTimer lifecycle state machine
  • Choosing the right timer API for your use case
  • Checking platform availability for timer APIs
  • Debugging timer behavior with LLDB commands

Example Prompts

  • "What's the API for Timer.publish in Combine?"
  • "How do I schedule a DispatchSourceTimer with leeway?"
  • "What RunLoop modes are available for Timer?"
  • "How do I run a repeating async timer with AsyncTimerSequence?"
  • "What's the platform availability for AsyncTimerSequence?"

What's Covered

  • Timer API (scheduledTimer, tolerance, RunLoop modes, invalidate lifecycle)
  • DispatchSourceTimer API (makeTimerSource, schedule, activate, suspend/resume/cancel, state machine)
  • Combine Timer (Timer.publish, autoconnect, RunLoop mode parameter)
  • AsyncTimerSequence (swift-async-algorithms package, ContinuousClock/SuspendingClock, structured concurrency)
  • Task.sleep patterns (one-shot delays vs repeating timers)
  • LLDB timer inspection commands
  • Platform availability matrix

Documentation Scope

This page documents the axiom-integration skill — the API reference Claude uses for timer syntax and lifecycle details.

For decision trees and crash prevention: See Timer Safety Patterns for when to use which timer API and how to prevent DispatchSourceTimer crashes.

Resources

Skills: axiom-integration, axiom-performance