14 releases (9 breaking)

0.10.0 Aug 27, 2024
0.9.0 Jul 1, 2024
0.8.0 May 17, 2024
0.7.0 Mar 1, 2024
0.2.0-beta.0 Feb 3, 2023

#244 in Magic Beans

Download history 8298/week @ 2024-05-16 8630/week @ 2024-05-23 11015/week @ 2024-05-30 10276/week @ 2024-06-06 9992/week @ 2024-06-13 10395/week @ 2024-06-20 8281/week @ 2024-06-27 10438/week @ 2024-07-04 8742/week @ 2024-07-11 7491/week @ 2024-07-18 9480/week @ 2024-07-25 8519/week @ 2024-08-01 8966/week @ 2024-08-08 9299/week @ 2024-08-15 10162/week @ 2024-08-22 8163/week @ 2024-08-29

38,208 downloads per month
Used in 12 crates (11 directly)

Apache-2.0

175KB
2.5K 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–11MB
~96K SLoC