system settings
git clone https://git.lucas.co/cce-system-interface.git
idle_poll_interval: tick polls a channel the runner cannot see
cce-ui@d5b22a5 sleeps between ticks while idle; this app drains its own
std channels in tick, so it bounds that sleep rather than waiting for an
unrelated event.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
src/main.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index 3036304..db644f4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -297,6 +297,13 @@ impl cce_ui::engine::Application for SystemInterface {
self.needs_rebuild = true;
}
+ /// `poll_background_updates` drains sixteen std channels fed by the
+ /// page workers; the runner cannot see them, so it may not sleep past
+ /// this between ticks.
+ fn idle_poll_interval(&self) -> Option<std::time::Duration> {
+ Some(std::time::Duration::from_millis(250))
+ }
+
fn tick(&mut self, dt: f32, needs_rebuild: &mut bool) {
if self.needs_rebuild {
self.rebuild_layout(self.width as f32, self.height as f32);