From dff93e73af428fac50f06d868723f5e576c51320 Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Sun, 8 Nov 2026 06:29:14 -0700 Subject: [PATCH] telephony: wake for the next announce instead of waiting on the idle tick --- crates/lxst-telephony/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/lxst-telephony/src/lib.rs b/crates/lxst-telephony/src/lib.rs index 004b0b7..acbc8f8 100644 --- a/crates/lxst-telephony/src/lib.rs +++ b/crates/lxst-telephony/src/lib.rs @@ -1298,6 +1298,8 @@ impl TelephonyService { period = wanted; interval = tokio::time::interval(period); } + // Announces keep their own deadline; the idle tick would quantize them to a second. + let next_announce_at = self.next_announce_at; tokio::select! { progressed = self.endpoint.manager.step(), if manager_open => { manager_open = progressed; @@ -1305,6 +1307,16 @@ impl TelephonyService { break; } } + _ = async { + match next_announce_at { + Some(at) => tokio::time::sleep_until(at).await, + None => std::future::pending().await, + } + } => { + if !self.handle_due_announce().await { + break; + } + } control = self.control_rx.recv() => { let Some(control) = control else { break;