MCPcopy Index your code
hub / github.com/RustOtomeLab/RustEng / start_timer

Method start_timer

src/executors/auto_executor.rs:92–108  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

90 }
91
92 pub(crate) fn start_timer(&mut self) {
93 let mut executor = self.executor.clone();
94 let is_auto = self.is_auto.clone();
95 let rx = self.auto_rx.take().unwrap();
96
97 self.timer.start(
98 slint::TimerMode::Repeated,
99 Duration::from_millis(100),
100 move || {
101 if is_auto.load(Ordering::Relaxed) && rx.try_recv().is_ok() {
102 executor
103 .execute_script()
104 .expect("auto execute_script failed");
105 }
106 },
107 );
108 }
109}

Callers

nothing calls this directly

Calls 1

execute_scriptMethod · 0.80

Tested by

no test coverage detected