get_time_func_t

Updated: October 26, 2022

Retrieve the current sensor time

Synopsis:

#include <sensor/external_sensor_api.h>
typedef int64_t(* get_time_func_t)(void *handle);

Arguments:

handle
The handle that's returned from calling the function referred to by open_external_sensor_func_t.

Library:

libsensor

Description:

This function must return the current time value in the sensor time domain in microseconds. The time domain used here must be the same one as the one used to fill the timestamp in GetPacket().

Note:

This function is optional. If not specified, the default implementation uses CLOCK_MONOTONIC

Returns:

The current sensor time in microseconds.