ic_cdk

Attribute Macro heartbeat

Source
#[heartbeat]
Expand description

Register the canister_heartbeat entry point of a canister.

This attribute macro will export the function canister_heartbeat in the canister module.

The function under this attribute must have no return value.

Each canister can only have one canister_heartbeat entry point.

ยงExample

#[heartbeat]
fn heartbeat_function() {
    // ...
}