#canister #internet-computer #dfinity #ic #subcanister

bity-ic-canister-time

Description spécifique de la crate

1 unstable release

new 0.1.0 Mar 14, 2025

#73 in Magic Beans


Used in bity-ic-utils

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–14MB
~173K SLoC