Returns the duration of the current turn in milliseconds, if a turn is active.
(&self)
| 362 | |
| 363 | /// Returns the duration of the current turn in milliseconds, if a turn is active. |
| 364 | pub fn current_turn_duration_ms(&self) -> Option<u64> { |
| 365 | self.current_turn_started_at.map(|started| { |
| 366 | let duration = Utc::now().signed_duration_since(started); |
| 367 | duration.num_milliseconds().max(0) as u64 |
| 368 | }) |
| 369 | } |
| 370 | |
| 371 | /// Returns `true` if the session has ended. |
| 372 | pub fn is_ended(&self) -> bool { |
no outgoing calls