pub trait ElapsedTimer {
type Timestamp: Timestamp;
// Required method
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.