Brief: Read the microsecond timer
Blocking: Depends on user implementation
ei_read_timer_us()is declared internally in the Edge Impulse SDK library, and the function must be defined by the user.
This function should return the number of milliseconds that have passed since the start of the program. If you do not need to determine the run times for DSP and inference blocks, you can simply return 0 from this function. Your impulse will still work correctly without timing information.
Returns: Number of microseconds that have passed since the start of the program.
Example: The following examples demonstrate possible implementations of this function for various platforms. Note the
__attribute__((weak))in most of the definitions, which means that a user could override the implementation elsewhere in the program: