pub struct Jiffies(/* private fields */);Expand description
Jiffies is a term used to denote the units of time measurement by the kernel.
A jiffy represents one tick of the system timer interrupt,
whose frequency is equal to TIMER_FREQ Hz.
Implementations§
Source§impl Jiffies
impl Jiffies
Sourcepub open spec fn duration_secs(self) -> u64
pub open spec fn duration_secs(self) -> u64
{ self@ / TIMER_FREQ }The whole-second component of this jiffy count.
Sourcepub open spec fn duration_nanos(self) -> u32
pub open spec fn duration_nanos(self) -> u32
{ (((self@ % TIMER_FREQ) * 1_000_000_000u64) / (TIMER_FREQ as int)) as u32 }The subsecond nanosecond component of this jiffy count.
Source§impl Jiffies
impl Jiffies
Sourcepub exec fn add(&mut self, jiffies: u64)
pub exec fn add(&mut self, jiffies: u64)
ensures
final(self)@ == old(self)@.saturating_add(jiffies),Adds the given number of jiffies, saturating at Jiffies::MAX on overflow.
Sourcepub exec fn as_duration(self) -> Duration
pub exec fn as_duration(self) -> Duration
returns
Duration::new(self.duration_secs(), self.duration_nanos()),Gets the Duration calculated from the jiffies counts.
Trait Implementations§
impl Copy for Jiffies
Auto Trait Implementations§
impl Freeze for Jiffies
impl RefUnwindSafe for Jiffies
impl Send for Jiffies
impl Sync for Jiffies
impl Unpin for Jiffies
impl UnsafeUnpin for Jiffies
impl UnwindSafe for Jiffies
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more