[][src]Struct kernel::VirtualSchedulerTimer

pub struct VirtualSchedulerTimer<A: 'static + Alarm<'static>> { /* fields omitted */ }

Implementation of SchedulerTimer trait on top of a virtual alarm.

Currently, this implementation depends slightly on the virtual alarm implementation in capsules -- namely it assumes that get_alarm will still return the passed value even after the timer is disarmed. Thus this should only be implemented with a virtual alarm. If a dedicated hardware timer is available, it is more performant to implement the scheduler timer directly for that hardware peripheral without the alarm abstraction in between.

This mostly handles conversions from wall time, the required inputs to the trait, to ticks, which are used to track time for alarms.

Implementations

impl<A: 'static + Alarm<'static>> VirtualSchedulerTimer<A>[src]

pub fn new(alarm: &'static A) -> Self[src]

Trait Implementations

impl<A: 'static + Alarm<'static>> AlarmClient for VirtualSchedulerTimer<A>[src]

impl<A: 'static + Alarm<'static>> SchedulerTimer for VirtualSchedulerTimer<A>[src]

Auto Trait Implementations

impl<A> Send for VirtualSchedulerTimer<A> where
    A: Sync

impl<A> Sync for VirtualSchedulerTimer<A> where
    A: Sync

impl<A> Unpin for VirtualSchedulerTimer<A>

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> 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.