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

#3 in #canister

Download history 9042/week @ 2024-07-10 7634/week @ 2024-07-17 9177/week @ 2024-07-24 8611/week @ 2024-07-31 9049/week @ 2024-08-07 9099/week @ 2024-08-14 10364/week @ 2024-08-21 9761/week @ 2024-08-28 10315/week @ 2024-09-04 9315/week @ 2024-09-11 7866/week @ 2024-09-18 9435/week @ 2024-09-25 9414/week @ 2024-10-02 9407/week @ 2024-10-09 9934/week @ 2024-10-16 7606/week @ 2024-10-23

38,068 downloads per month
Used in 13 crates (12 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–9.5MB
~94K SLoC