Trait timestamp_source::ElapsedTimer
source · pub trait ElapsedTimer {
type Timestamp: Timestamp;
fn timeout(
&self,
from: &Self::Timestamp,
to: &Self::Timestamp
) -> Result<bool, <Self::Timestamp as Timestamp>::Error>;
}
Expand description
Represents an elapsed timer.
Required Associated Types§
Required Methods§
sourcefn timeout(
&self,
from: &Self::Timestamp,
to: &Self::Timestamp
) -> Result<bool, <Self::Timestamp as Timestamp>::Error>
fn timeout(
&self,
from: &Self::Timestamp,
to: &Self::Timestamp
) -> Result<bool, <Self::Timestamp as Timestamp>::Error>
Returns true if a timer duration is more(equal) then duration between from-to timestamps, otherwise false.
Errors
This function will return an error if duration between from-to timestamps is negative.