Struct medea_client_api_proto::stats::HighResTimeStamp[][src]

pub struct HighResTimeStamp(pub f64);

Representation of DOMHighResTimeStamp.

Can be converted to the SystemTime with millisecond-wise accuracy.

HighResTimeStamp type is a f64 and is used to store a time value in milliseconds. This type can be used to describe a discrete point in time or a time interval (the difference in time between two discrete points in time).

The time, given in milliseconds, should be accurate to 5 µs (microseconds), with the fractional part of the number indicating fractions of a millisecond. However, if the browser is unable to provide a time value accurate to 5 µs (due, for example, to hardware or software constraints), the browser can represent the value as a time in milliseconds accurate to a millisecond. Also note the section below on reduced time precision controlled by browser preferences to avoid timing attacks and fingerprinting.

Further, if the device or operating system the user agent is running on doesn’t have a clock accurate to the microsecond level, they may only be accurate to the millisecond.

Trait Implementations

impl Clone for HighResTimeStamp[src]

impl Copy for HighResTimeStamp[src]

impl Debug for HighResTimeStamp[src]

impl<'de> Deserialize<'de> for HighResTimeStamp[src]

impl From<SystemTime> for HighResTimeStamp[src]

impl Hash for HighResTimeStamp[src]

Hashing string representation.

Some people believe that such behavior is incorrect (but in some programming languages this is a default behavior) due to NaN, Inf or -Inf (they all will have the same hashes). But in the case of RtcStat received from the client, there should be no such situations, and the hash will always be correct.

impl PartialEq<HighResTimeStamp> for HighResTimeStamp[src]

Comparison string representations.

Such implementation is required, so that the results of comparing values and comparing hashes match.

impl Serialize for HighResTimeStamp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.