Trait diem_time_service::SleepTrait [−][src]
pub trait SleepTrait: Future<Output = ()> + Send + Sync + Debug {
fn is_elapsed(&self) -> bool;
fn reset(self: Pin<&mut Self>, duration: Duration);
fn reset_until(self: Pin<&mut Self>, deadline: Instant);
}Required methods
fn is_elapsed(&self) -> bool
fn is_elapsed(&self) -> bool
Returns true if this Sleep’s requested wait duration has elapsed.
Resets this Sleep to wait again for duration.
fn reset_until(self: Pin<&mut Self>, deadline: Instant)
fn reset_until(self: Pin<&mut Self>, deadline: Instant)
Reset this Sleep to wait again until the deadline.