3-phase PV router
Loading...
Searching...
No Matches
BenchTimer Namespace Reference

Functions

void begin ()
 Starts counting: from the last instruction on, one count per CPU cycle.
 
uint32_t end ()
 The cycles since begin(), its own instructions included.
 
void start ()
 Starts a measurement (the first one also measures the overhead).
 
uint32_t stop ()
 The CPU cycles since start(), without those of start() and stop().
 

Variables

bool calibrated { false }
 
volatile uint16_t overflows { 0 }
 
uint32_t overhead { 0 }
 
uint8_t savedTimsk0 { 0 }
 

Function Documentation

◆ begin()

void BenchTimer::begin ( )
inline

Starts counting: from the last instruction on, one count per CPU cycle.

Definition at line 37 of file bench_timer.h.

Here is the caller graph for this function:

◆ end()

uint32_t BenchTimer::end ( )
inline

The cycles since begin(), its own instructions included.

Definition at line 52 of file bench_timer.h.

Here is the caller graph for this function:

◆ start()

void BenchTimer::start ( )
inline

Starts a measurement (the first one also measures the overhead).

Definition at line 72 of file bench_timer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

uint32_t BenchTimer::stop ( )
inline

The CPU cycles since start(), without those of start() and stop().

Definition at line 84 of file bench_timer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ calibrated

bool BenchTimer::calibrated { false }
inline

Definition at line 34 of file bench_timer.h.

◆ overflows

volatile uint16_t BenchTimer::overflows { 0 }
inline

Timer1 overflows since start()

Definition at line 31 of file bench_timer.h.

◆ overhead

uint32_t BenchTimer::overhead { 0 }
inline

cycles of an empty start()/stop()

Definition at line 33 of file bench_timer.h.

◆ savedTimsk0

uint8_t BenchTimer::savedTimsk0 { 0 }
inline

the Timer0 interrupts to restore in stop()

Definition at line 32 of file bench_timer.h.