MCPcopy Create free account
hub / github.com/dfinity/orbit / clear_timer

Function clear_timer

libs/orbit-essentials/src/timers.rs:27–34  ·  view source on GitHub ↗
(timer_id: TimerId)

Source from the content-addressed store, hash-verified

25 }
26
27 pub fn clear_timer(timer_id: TimerId) {
28 TIMERS.with(|timers| {
29 let mut timers = timers.borrow_mut();
30 if let Some(index) = timers.iter().position(|(id, _)| *id == timer_id) {
31 let _ = timers.remove(index);
32 }
33 })
34 }
35}

Callers 1

Calls 2

iterMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected