15 releases (breaking)

new 0.11.0 Nov 5, 2024
0.9.0 Jul 1, 2024
0.7.0 Mar 1, 2024
0.6.0 Nov 23, 2023
0.2.0-beta.0 Feb 3, 2023

#7 in #canister

Download history 7982/week @ 2024-07-16 8492/week @ 2024-07-23 8434/week @ 2024-07-30 9633/week @ 2024-08-06 8751/week @ 2024-08-13 10389/week @ 2024-08-20 9256/week @ 2024-08-27 9823/week @ 2024-09-03 10439/week @ 2024-09-10 7765/week @ 2024-09-17 9495/week @ 2024-09-24 9745/week @ 2024-10-01 8799/week @ 2024-10-08 9878/week @ 2024-10-15 9736/week @ 2024-10-22 8479/week @ 2024-10-29

38,647 downloads per month
Used in 13 crates (12 directly)

Apache-2.0

180KB
3K SLoC

Rust CDK Timers Library

Documentation Crates.io License Downloads CI

This crate provides a library to schedule multiple and periodic tasks on the Internet Computer.

Example

In Cargo.toml:

[dependencies]
ic-cdk-timers = "0.9.0"

To schedule a one-shot task to be executed 1s later:

ic_cdk_timers::set_timer(Duration::from_secs(1), || ic_cdk::println!("Hello from the future!"));

References

  1. Internet Computer Developer Guide: Periodic Tasks and Timers
  2. Example: Periodic Tasks and Timers (compares timers and heartbeats).

Dependencies

~2–9MB
~93K SLoC