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

Method start_timer

src/executors/skip_executor.rs:49–68  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

47 }
48
49 pub(crate) fn start_timer(&mut self) {
50 let executor = self.executor.clone();
51 let is_skip = self.is_skip.clone();
52
53 self.timer.start(
54 slint::TimerMode::Repeated,
55 Duration::from_millis(100),
56 move || {
57 if is_skip.load(Ordering::Relaxed) {
58 let mut executor = executor.clone();
59 slint::spawn_local(async move {
60 if let Err(e) = executor.execute_script() {
61 eprintln!("skip execute_script failed: {e}");
62 }
63 })
64 .expect("skip-play timer: no slint event loop");
65 }
66 },
67 );
68 }
69}

Callers 1

load_dataFunction · 0.45

Calls 1

execute_scriptMethod · 0.80

Tested by

no test coverage detected