-If user didn't set batch latency, not call
Change-Id: Id8511bebf8a6dd60d3a67b996440c9fabb1963b4
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
#include <stdbool.h>
#include <sys/types.h>
+#include <limits.h>
/*header for common sensor type*/
#include <sensor_types.h>
#include <sensor_deprecated.h>
#include <sensor_internal_deprecated.h>
+const unsigned int SENSOR_BATCH_LATENCY_DEFAULT = UINT_MAX;
+
#ifdef __cplusplus
extern "C"
{
listener->set_interval(interval);
batch_latency = listener->get_max_batch_latency();
- listener->set_max_batch_latency(batch_latency);
+ if (batch_latency != SENSOR_BATCH_LATENCY_DEFAULT)
+ listener->set_max_batch_latency(batch_latency);
_D("Start[%d] with the interval[%d] batch_latency[%d]",
listener->get_id(), interval, batch_latency);