nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ ei_wrapper_get_timing()

int ei_wrapper_get_timing ( int *  dsp_time,
int *  classification_time,
int *  anomaly_time 
)

#include <include/ei_wrapper.h>

Get execution times for operations performed by the library.

This function can be executed only from the wrapper's callback context. Otherwise, it returns a (negative) error code.

The library uses Zephyr's uptime for calculations. Because of that execution times can be affected by other operations performed by the CPU.

If calculating the anomaly value is not supported, anomaly_time is set to the value of -1.

Parameters
[out]dsp_timePointer to the variable that is used to store the dsp time.
[out]classification_timePointer to the variable that is used to store the classification time.
[out]anomaly_timePointer to the variable that is used to store the anomaly time.
Return values
0If the operation was successful. Otherwise, a (negative) error code is returned.