Crates.io | ic-cdk-timers |
lib.rs | ic-cdk-timers |
version | 0.11.0 |
source | src |
created_at | 2023-02-03 18:15:13.871469 |
updated_at | 2024-11-05 14:48:32.288405 |
description | Timers library for the Rust CDK. |
homepage | https://docs.rs/ic-cdk |
repository | https://github.com/dfinity/cdk-rs |
max_upload_size | |
id | 775798 |
size | 26,872 |
This crate provides a library to schedule multiple and periodic tasks on the Internet Computer.
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!"));