11 releases (6 breaking)

0.7.0 Mar 1, 2024
0.6.0 Nov 23, 2023
0.5.1 Oct 12, 2023
0.4.0 Jul 13, 2023
0.2.0-beta.0 Feb 3, 2023

#1130 in Magic Beans

Download history 12937/week @ 2023-11-29 12361/week @ 2023-12-06 11126/week @ 2023-12-13 4477/week @ 2023-12-20 2514/week @ 2023-12-27 5408/week @ 2024-01-03 5641/week @ 2024-01-10 7266/week @ 2024-01-17 7720/week @ 2024-01-24 17090/week @ 2024-01-31 16918/week @ 2024-02-07 15461/week @ 2024-02-14 11656/week @ 2024-02-21 9246/week @ 2024-02-28 10548/week @ 2024-03-06 6231/week @ 2024-03-13

39,998 downloads per month
Used in 6 crates (5 directly)

Apache-2.0

160KB
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.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

~4MB
~77K SLoC