#[non_exhaustive]pub enum PerfClock {
Real(fn() -> u64),
Fake(FakeClock),
}Expand description
A clock in whole microseconds, from a backend
(shuyi_platform::Platform::clock) or a test.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Real(fn() -> u64)
The device’s clock: microseconds from any fixed start, never going back.
Fake(FakeClock)
A clock that moves by fixed steps on each read, so a test’s records
are the same on every run (FakeClock).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerfClock
impl RefUnwindSafe for PerfClock
impl Send for PerfClock
impl Sync for PerfClock
impl Unpin for PerfClock
impl UnsafeUnpin for PerfClock
impl UnwindSafe for PerfClock
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