pub struct StaleClock { /* private fields */ }Expand description
Elapsed time over a dump stream, for parsers that drop state a connection or dialog has stopped feeding.
A dated timestamp gives absolute seconds from its own date. A time-only timestamp has no date, so it gets a synthetic day counter that increments when the clock wraps past midnight. The two carry no common epoch: a stream that changes format resets the clock, and the sweep that would follow that reset is skipped, since every recorded time then belongs to the other domain.
Implementations§
Source§impl StaleClock
impl StaleClock
Sourcepub const TIMEOUT_SECS: u64 = 7200
pub const TIMEOUT_SECS: u64 = 7200
How long a connection or dialog may stay silent before its pending state is dropped: the RFC 793 default TCP keepalive timeout, beyond which a VoIP connection is dead.
Sourcepub fn observe(&mut self, timestamp: Timestamp) -> u64
pub fn observe(&mut self, timestamp: Timestamp) -> u64
Record a timestamp and return the stream time it reads, in seconds.
Trait Implementations§
Source§impl Clone for StaleClock
impl Clone for StaleClock
Source§fn clone(&self) -> StaleClock
fn clone(&self) -> StaleClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaleClock
impl Debug for StaleClock
Source§impl Default for StaleClock
impl Default for StaleClock
Source§fn default() -> StaleClock
fn default() -> StaleClock
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StaleClock
impl RefUnwindSafe for StaleClock
impl Send for StaleClock
impl Sync for StaleClock
impl Unpin for StaleClock
impl UnsafeUnpin for StaleClock
impl UnwindSafe for StaleClock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more