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

#7 in #cdk

Download history 9054/week @ 2024-10-12 9852/week @ 2024-10-19 9048/week @ 2024-10-26 9376/week @ 2024-11-02 8835/week @ 2024-11-09 10844/week @ 2024-11-16 10504/week @ 2024-11-23 12380/week @ 2024-11-30 12722/week @ 2024-12-07 9891/week @ 2024-12-14 2251/week @ 2024-12-21 3258/week @ 2024-12-28 11212/week @ 2025-01-04 12292/week @ 2025-01-11 12712/week @ 2025-01-18 8546/week @ 2025-01-25

45,699 downloads per month
Used in 14 crates (13 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–9.5MB
~89K SLoC