Struct zircon_object::signal::Timer[][src]

pub struct Timer { /* fields omitted */ }

An object that may be signaled at some point in the future

SYNOPSIS

A timer is used to wait until a specified point in time has occurred or the timer has been canceled.

Implementations

impl Timer[src]

pub fn new() -> Arc<Self>[src]

Create a new Timer.

pub fn with_slack(slack: Slack) -> Arc<Self>[src]

Create a new Timer with slack.

pub fn one_shot(deadline: Duration) -> Arc<Self>[src]

Create a one-shot timer.

pub fn set(self: &Arc<Self>, deadline: Duration, _slack: Duration)[src]

Starts a one-shot timer that will fire when deadline passes.

If a previous call to set was pending, the previous timer is canceled and Signal::SIGNALED is de-asserted as needed.

pub fn cancel(&self)[src]

Cancel the pending timer started by set.

Trait Implementations

impl Debug for Timer[src]

impl KernelObject for Timer[src]

Auto Trait Implementations

impl !RefUnwindSafe for Timer

impl Send for Timer

impl Sync for Timer

impl Unpin for Timer

impl !UnwindSafe for Timer

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

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

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.