MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / current_turn_duration_ms

Method current_turn_duration_ms

atomic-agent/src/turn/session.rs:370–375  ·  view source on GitHub ↗

Returns the duration of the current turn in milliseconds, if a turn is active.

(&self)

Source from the content-addressed store, hash-verified

368
369 /// Returns the duration of the current turn in milliseconds, if a turn is active.
370 pub fn current_turn_duration_ms(&self) -> Option<u64> {
371 self.current_turn_started_at.map(|started| {
372 let duration = Utc::now().signed_duration_since(started);
373 duration.num_milliseconds().max(0) as u64
374 })
375 }
376
377 /// Returns `true` if the session has ended.
378 pub fn is_ended(&self) -> bool {

Callers 3

handle_session_endMethod · 0.80
handle_turn_endMethod · 0.80

Calls

no outgoing calls

Tested by 1