12 releases (7 breaking)

new 0.8.0 May 17, 2024
0.7.0 Mar 1, 2024
0.6.0 Nov 23, 2023
0.4.0 Jul 13, 2023
0.2.0-beta.0 Feb 3, 2023

#1145 in Magic Beans

Download history 15345/week @ 2024-02-01 17037/week @ 2024-02-08 14384/week @ 2024-02-15 12125/week @ 2024-02-22 8346/week @ 2024-02-29 10570/week @ 2024-03-07 8215/week @ 2024-03-14 11812/week @ 2024-03-21 8011/week @ 2024-03-28 9114/week @ 2024-04-04 10535/week @ 2024-04-11 12979/week @ 2024-04-18 9573/week @ 2024-04-25 11052/week @ 2024-05-02 7262/week @ 2024-05-09 6910/week @ 2024-05-16

37,122 downloads per month
Used in 7 crates (6 directly)

Apache-2.0

175KB
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.4.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–4MB
~77K SLoC