Returns the duration of the current turn in milliseconds, if a turn is active.
(&self)
| 619 | |
| 620 | /// Returns the duration of the current turn in milliseconds, if a turn is active. |
| 621 | pub fn current_turn_duration_ms(&self) -> Option<u64> { |
| 622 | self.current_turn_started_at.map(|started| { |
| 623 | let duration = Utc::now().signed_duration_since(started); |
| 624 | duration.num_milliseconds().max(0) as u64 |
| 625 | }) |
| 626 | } |
| 627 | |
| 628 | /// Returns `true` if the session has ended. |
| 629 | pub fn is_ended(&self) -> bool { |
no outgoing calls