Returns the duration of the current turn in milliseconds, if a turn is active.
(&self)
| 334 | |
| 335 | /// Returns the duration of the current turn in milliseconds, if a turn is active. |
| 336 | pub fn current_turn_duration_ms(&self) -> Option<u64> { |
| 337 | self.current_turn_started_at.map(|started| { |
| 338 | let duration = Utc::now().signed_duration_since(started); |
| 339 | duration.num_milliseconds().max(0) as u64 |
| 340 | }) |
| 341 | } |
| 342 | |
| 343 | /// Returns `true` if the session has ended. |
| 344 | pub fn is_ended(&self) -> bool { |
no outgoing calls