15 releases (breaking)

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

#411 in Magic Beans

Download history 7925/week @ 2024-07-29 9651/week @ 2024-08-05 9108/week @ 2024-08-12 9385/week @ 2024-08-19 9739/week @ 2024-08-26 10511/week @ 2024-09-02 10036/week @ 2024-09-09 8048/week @ 2024-09-16 8956/week @ 2024-09-23 9970/week @ 2024-09-30 8843/week @ 2024-10-07 9183/week @ 2024-10-14 10016/week @ 2024-10-21 8976/week @ 2024-10-28 9164/week @ 2024-11-04 8845/week @ 2024-11-11

37,272 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–9.5MB
~96K SLoC