MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / check_timeout

Method check_timeout

crates/opencode-tui/src/context/keybind.rs:28–36  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

26 }
27
28 pub fn check_timeout(&mut self) -> bool {
29 if let Some(start) = self.start_time {
30 if start.elapsed() > Duration::from_millis(LEADER_TIMEOUT_MS) {
31 self.reset();
32 return true;
33 }
34 }
35 false
36 }
37
38 pub fn reset(&mut self) {
39 self.active = false;

Callers 1

handle_eventMethod · 0.80

Calls 1

resetMethod · 0.80

Tested by

no test coverage detected