base: periodic_logger: fix bad timer usage

Waiting on a `WaitContext` isn't enough, the timer must be ack'd. I
suspect this code has only been used on Windows, where the ack
technically isn't needed.

Change-Id: Ia53714a4f94f83310decf45888c9314e4631da5a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5825224
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Frederick Mayle <fmayle@google.com>
This commit is contained in:
Frederick Mayle 2024-08-28 15:14:21 -07:00 committed by crosvm LUCI
parent 2f813de683
commit 80536f4aaf

View file

@ -112,6 +112,8 @@ impl PeriodicLogger {
break 'outer;
}
Token::PeriodicLog => {
timer.mark_waited().unwrap();
let counter_map = cloned_counter.read().map_err(|e| {
PeriodicLoggerError::ReadLockError(e.to_string())
})?;