Trait kernel::hil::hw_debug::CycleCounter
source · pub trait CycleCounter {
// Required methods
fn start(&self);
fn stop(&self);
fn count(&self) -> u64;
fn reset(&self);
// Provided method
fn profile_closure<F: FnOnce()>(&self, f: F) -> u64 { ... }
}
Required Methods§
Provided Methods§
sourcefn profile_closure<F: FnOnce()>(&self, f: F) -> u64
fn profile_closure<F: FnOnce()>(&self, f: F) -> u64
Benchmark the number of cycles to run a passed closure. This function is intended for use debugging in-kernel routines.
Object Safety§
This trait is not object safe.