From: Ian Jackson Date: Sat, 20 Mar 2021 19:00:45 +0000 (+0000) Subject: clock: Some todos X-Git-Tag: otter-0.5.0~623 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0b33ceb033a591682c7bdfc14579bd9360eb0cd7;p=otter.git clock: Some todos Signed-off-by: Ian Jackson --- diff --git a/src/clock.rs b/src/clock.rs index 63e8b089..6d376307 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -296,6 +296,8 @@ impl ThreadState { #[throws(IE)] fn run(mut self) { loop { + // xxx this seems to spin + match self.next_wakeup { Some(wakeup) => { let timeout = wakeup - now()?; @@ -671,6 +673,8 @@ impl PieceTrait for Clock { let state: &mut State = gpc.xdata_mut_exp()?; let was_running = state.implies_running(was_held); + // xxx auto-change active player + state.do_start_or_stop(piece, was_running, now_held, ig)?; unprepared_update(piece) }