(&mut self, fuzzer: &Fuzzer)
| 217 | } |
| 218 | |
| 219 | pub fn maybe_sync(&mut self, fuzzer: &Fuzzer) { |
| 220 | let elapsed_time = self.last_sync.elapsed(); |
| 221 | if elapsed_time < std::time::Duration::from_secs(1) { |
| 222 | return; |
| 223 | } |
| 224 | |
| 225 | if let Some(mut monitor) = fuzzer.global.monitor.as_ref().and_then(|x| x.lock().ok()) { |
| 226 | monitor.sync(*self); |
| 227 | if fuzzer.global.is_main_instance() { |
| 228 | monitor.update(fuzzer); |
| 229 | } |
| 230 | *self = Self::default(); |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | #[derive(serde::Serialize)] |
no test coverage detected