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

#6 in #dfinity

Download history 9848/week @ 2024-09-08 8157/week @ 2024-09-15 8930/week @ 2024-09-22 10018/week @ 2024-09-29 8987/week @ 2024-10-06 9120/week @ 2024-10-13 9945/week @ 2024-10-20 8997/week @ 2024-10-27 9273/week @ 2024-11-03 9069/week @ 2024-11-10 10739/week @ 2024-11-17 10514/week @ 2024-11-24 12366/week @ 2024-12-01 12945/week @ 2024-12-08 9529/week @ 2024-12-15 2264/week @ 2024-12-22

37,505 downloads per month
Used in 16 crates (15 directly)

Apache-2.0

185KB
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
~91K SLoC