OSDN Git Service

[Workaround] Fix event timestamp recurrency
authorAdriana Reus <adriana.reus@intel.com>
Mon, 15 Sep 2014 11:06:56 +0000 (14:06 +0300)
committerAdriana Reus <adriana.reus@intel.com>
Mon, 15 Sep 2014 13:01:10 +0000 (16:01 +0300)
A lot of new cts test for sensors expect to have
very regular intervals for events or else they will
report event gaps. Getting the timestamp right before
reporting seems to level them.

Issue: GMINL-544
Change-Id: Ie9554ba3ff95a5fa2c5bb29083181bf23776765e
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
control.c

index 1918976..0fc7b22 100644 (file)
--- a/control.c
+++ b/control.c
@@ -781,7 +781,7 @@ static int propagate_sensor_report(int s, struct sensors_event_t  *data)
        data->version   = sizeof(sensors_event_t);
        data->sensor    = s;
        data->type      = sensor_type;
-       data->timestamp = sensor_info[s].report_ts;
+       data->timestamp = get_timestamp();
 
        ALOGV("Sample on sensor %d (type %d):\n", s, sensor_type);