(&mut self)
| 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 | } |
nothing calls this directly
no test coverage detected