Skip to main content

ic_timers/
lib.rs

1//! Observable and recovery-aware timer primitives for Internet Computer
2//! canisters.
3//!
4//! `ic-timers` is a higher-level wrapper around `ic-cdk-timers`, which remains
5//! the provider that arms and clears platform timers. This crate adds
6//! provider-neutral control, scheduling, and observation values above it.
7//!
8//! This initial scaffold exposes the deterministic control and platform
9//! boundaries extracted from Canic. It does not yet provide the complete
10//! registry or watchdog runtime described in the workspace architecture note.
11
12#![forbid(unsafe_code)]
13#![deny(rustdoc::broken_intra_doc_links)]
14
15pub mod control;
16pub mod platform;
17pub mod schedule;
18pub mod snapshot;
19
20pub use control::{TimerControl, TimerControlAction, TimerControlError, TimerRegistration};
21pub use platform::{TimerHandle, clear_timer, set_timer};
22pub use schedule::{ScheduleError, TimerDirective};
23pub use snapshot::{
24    MAX_TIMER_LABEL_BYTES, MeasurementSummary, PreArmedSuccessor, TimerCompletion,
25    TimerCompletionOutcome, TimerCounters, TimerDirectiveSnapshot, TimerEpoch, TimerIdentity,
26    TimerIdentityError, TimerIdentityField, TimerLabel, TimerLabelError, TimerLastOutcome,
27    TimerMeasurement, TimerObservabilitySnapshot, TimerOutcomeSnapshot, TimerPerformance,
28    TimerPolicy, TimerProcessCondition, TimerRegistrationStatus, TimerSchedulingMode,
29    TimerSchedulingSnapshot, TimerSnapshot, TimerStateSnapshot,
30};