Heartbeat improvements / Timers [Community Consideration]

Quick question - Does setting or cancelling a timer have a cycles cost? I’m aware that the timer calling it’s task does.

There is no fee associated with timer setting/cancelling. It’s rather is a normal Canister execution (there are libraries for Motoko and Rust), so each library call takes some (rather tiny) amount of Instructions.

The precise number of Instructions depend on the language, library version, compilation options etc. There is a performance counter to measure precisely the number of Instructions consumed by a Canister code snippet.

Note, there is an update message execution fee on IC, which is 590K cycles, and timer execution is an update message. But setting/cancelling the timer is just a few Instructions, there is no fee for that…

Here is the list of the IC fees for the reference: Internet Computer Loading

3 Likes