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
37,122 downloads per month
Used in 7 crates
(6 directly)
175KB
3K
SLoC
Rust CDK Timers Library
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
- Internet Computer Developer Guide: Periodic Tasks and Timers
- Example: Periodic Tasks and Timers (compares timers and heartbeats).
Dependencies
~2.9–4MB
~77K SLoC