hive-agent: finish chrono-clock migration on remaining call sites

This commit is contained in:
damocles 2026-08-01 23:49:03 +02:00 committed by mara
commit f4a35786b1
10 changed files with 63 additions and 47 deletions

View file

@ -770,7 +770,7 @@ async fn handle_turn<S: Surface>(
unread,
});
bus.set_state(TurnState::Thinking);
let started_at = serve_common::now_unix();
let started_at = chrono::Utc::now().timestamp();
let started_instant = std::time::Instant::now();
let model_at_start = bus.model();
let prompt = serve_common::format_wake_prompt(msg_id, &from, &body, unread, redelivered);
@ -842,7 +842,7 @@ async fn handle_turn<S: Surface>(
let sid = stats.start_session(started_at, &model_at_start);
bus.set_session_id(sid);
}
let ended_at = serve_common::now_unix();
let ended_at = chrono::Utc::now().timestamp();
let duration_ms = i64::try_from(started_instant.elapsed().as_millis()).unwrap_or(i64::MAX);
let (open_threads, open_reminders) = S::post_turn_counts(socket).await;
let row = serve_common::build_row(serve_common::TurnRowArgs {