MCPcopy Create free account
hub / github.com/Botloader/botloader / next_action

Method next_action

components/scheduler/src/interval_timer_manager.rs:50–64  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

48 }
49
50 pub fn next_action(&mut self) -> NextAction {
51 let next_time = if let Some(next) = self.next_event_time() {
52 next
53 } else {
54 return NextAction::None;
55 };
56
57 let now = Utc::now();
58 if now > next_time {
59 // we need to trigger some timers
60 NextAction::Run
61 } else {
62 NextAction::Wait(next_time)
63 }
64 }
65
66 pub async fn trigger_timers(&mut self) -> Vec<IntervalTimer> {
67 let next_time = if let Some(next) = self.next_event_time() {

Callers 1

next_eventMethod · 0.45

Calls 1

next_event_timeMethod · 0.80

Tested by

no test coverage detected