modm API documentation
modm::CycleCounter Class Reference

Public Typedefs

using cycle_t = uint32_t
 

Public Member Functions

void initialize (bool force[[maybe_unused]]=false, uint8_t overhead=4)
 
void start ()
 Sample the timer at the start of your measurement.
 
void stop ()
 Sample the timer at the end of your measurement.
 
cycle_t cycles ()
 
uint32_t milliseconds ()
 
uint32_t microseconds ()
 
uint32_t nanoseconds ()
 

Member Function Documentation

cycle_t modm::CycleCounter::cycles ( )
inline
Returns
the difference in cycles between start and stop.
void modm::CycleCounter::initialize ( bool force]  [[maybe_unused] = false,
uint8_t  overhead = 4 
)
inline
Parameters
forceoverwrite previous timer configuration
overheadtotal number of overhead cycles
uint32_t modm::CycleCounter::microseconds ( )
inline
Returns
the difference in microseconds between start and stop.
uint32_t modm::CycleCounter::milliseconds ( )
inline
Returns
the difference in milliseconds between start and stop.
uint32_t modm::CycleCounter::nanoseconds ( )
inline
Returns
the difference in nanoseconds between start and stop.

The documentation for this class was generated from the following file: