Loading...
Searching...
No Matches

ztimer overhead measurement functionality More...

Detailed Description

ztimer overhead measurement functionality

Files

file  overhead.h
 ztimer_overhead API
 

Functions

int32_t ztimer_overhead_set (ztimer_clock_t *clock, uint32_t base)
 Measure overhead for ztimer_set()
 
int32_t ztimer_overhead_sleep (ztimer_clock_t *clock, uint32_t base)
 Measure overhead for ztimer_sleep()
 

Function Documentation

◆ ztimer_overhead_set()

int32_t ztimer_overhead_set ( ztimer_clock_t clock,
uint32_t  base 
)

Measure overhead for ztimer_set()

This function can be used to measure the overhead incurred by ztimer_set(). It will configure a callback to trigger after base ticks, then return the number of ticks that have passed, minus base.

Parameters
[in]clockztimer clock to operate on
[in]basebase interval to use
Returns
(time from ztimer_set() until callback) - base

◆ ztimer_overhead_sleep()

int32_t ztimer_overhead_sleep ( ztimer_clock_t clock,
uint32_t  base 
)

Measure overhead for ztimer_sleep()

This function can be used to measure the overhead incurred by ztimer_sleep().

Parameters
[in]clockztimer clock to operate on
[in]basebase interval to use
Returns
(time(ztimer_sleep(base))) - base