#dfinity #subcanister #time #canister

bity-ic-canister-time

Description spécifique de la crate

1 unstable release

0.1.0 Mar 14, 2025

#8 in #subcanister

27 downloads per month
Used in 5 crates (2 directly)

MIT license

16KB
114 lines

Module for time-related operations in Internet Computer canisters.

This module provides utilities for working with time in canisters, including timestamp functions, time constants, and timer scheduling functions. It supports both WASM and non-WASM environments.

Example

use icrc7_nft::libraries::canister_time::{timestamp_millis, run_interval};
use std::time::Duration;

let current_time = timestamp_millis();
run_interval(Duration::from_secs(60), || {
    println!("Running periodic task");
});

Dependencies

~6–13MB
~171K SLoC