sensor_stop_recording()

Updated: April 19, 2023

Stop recording sensor data

Synopsis:

#include <sensor/sensor_api.h>
sensor_error_t sensor_stop_recording(sensor_handle_t handle,
                                     struct timespec *time)

Arguments:

handle
The handle that's returned from calling sensor_open().
time
Set to NULL to stop recording immediately, or to an absolute time (with CLOCK_MONOTONIC as the reference) to specify when to stop recording. Subsequent sensor_stop_recording() calls made before the stopping time will update this time or stop the recording immediately.

Library:

libsensor

Returns:

SENSOR_EOK when the function successfully completes, otherwise another sensor_error_t value that provides the reason that the call failed.