Skip to content
nimatime
·v1.0.0·Apache-2.0

Timer@axint/timer

Start, stop, or cancel a named timer via Siri or Shortcuts

app-intentproductivity#timer#siri#shortcuts#productivity
GitHub-linked publisherPublished with Axint 0.3.9Source includedDocs attachedLast revalidated on Axint 0.3.9 · 3h agoPolicy clear for v1.0.0
Open in Cloud
Installs 0 totalSupports typescript
Validation healthy3h ago
0E / 0W / 0I · Last revalidated on Axint 0.3.9

Registry installs are directional counts from install requests. Use source, validation, and publisher metadata before treating them as adoption proof.

Browser preview
Built in 42ms
Source
37 lines
Generated Swift
28 lines
axint typescript → Swift
README

@axint/timer

An App Intent for controlling named timers. Start, stop, or cancel from Siri.

axint add @axint/timer

What you get

One App Intent with three actions:

  • start — schedules a new timer with the given label and duration
  • stop — ends the named timer
  • cancel — cancels the named timer without completing

Compiling through Axint produces ControlTimer.swift with a validated action parameter, an optional label, and a durationSeconds parameter that's only consumed on start.

Wiring the timer scheduling

The intent returns the action and parameters. Your host app handles the actual scheduling — typically through UNUserNotificationCenter for user-facing timers or a Task + Timer combo for in-app flows.

func perform() async throws -> some IntentResult {
  let result = try await IntentResultsHandler.shared.controlTimer(
    action: action,
    label: label,
    durationSeconds: durationSeconds
  )
  return .result(dialog: IntentDialog(stringLiteral: result.message))
}

License

Apache-2.0