Trait rustsbi::Timer

source ·
pub trait Timer: Send + Sync {
    // Required method
    fn set_timer(&self, stime_value: u64);
}
Expand description

Timer programmer support

Required Methods§

source

fn set_timer(&self, stime_value: u64)

Programs the clock for next event after stime_value time.

stime_value is in absolute time. This function must clear the pending timer interrupt bit as well.

If the supervisor wishes to clear the timer interrupt without scheduling the next timer event, it can either request a timer interrupt infinitely far into the future (i.e., (uint64_t)-1), or it can instead mask the timer interrupt by clearing sie.STIE CSR bit.

Implementations on Foreign Types§

source§

impl Timer for Infallible

source§

fn set_timer(&self, _: u64)

source§

impl<T: Timer> Timer for &T

source§

fn set_timer(&self, stime_value: u64)

Implementors§