summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-10-01 01:04:25 (GMT)
committerSung-jae Park <nicesj.park@samsung.com>2013-10-01 01:04:25 (GMT)
commite7ba941434565f25f3dfe0871a92b18ec37642dc (patch)
tree2b7102009915be3593ec29b78c575e1bf1f25ba7
parent91d6529ccef84f3f63634898afc45307a610bc35 (diff)
downloaddata-provider-master-e7ba941434565f25f3dfe0871a92b18ec37642dc.zip
data-provider-master-e7ba941434565f25f3dfe0871a92b18ec37642dc.tar.gz
data-provider-master-e7ba941434565f25f3dfe0871a92b18ec37642dc.tar.bz2
Do not use the clock_gettime for compensating period
Change-Id: Iee7ebb3d91015ee4eca1711303bc731818b462c4
-rw-r--r--src/util.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/util.c b/src/util.c
index 1caee09..58ff2eb 100644
--- a/src/util.c
+++ b/src/util.c
@@ -360,6 +360,7 @@ HAPI double util_time_delay_for_compensation(double period)
unsigned long long curtime;
unsigned long long _period;
unsigned long long remain;
+ struct timeval tv;
double ret;
if (period == 0.0f) {
@@ -367,19 +368,12 @@ HAPI double util_time_delay_for_compensation(double period)
return 0.0f;
}
-#if defined(_USE_ECORE_TIME_GET)
- double tv;
- tv = ecore_time_get();
- curtime = tv * 1000000llu;
-#else
- struct timeval tv;
if (gettimeofday(&tv, NULL) < 0){
ErrPrint("gettimeofday: %s\n", strerror(errno));
return period;
}
curtime = (unsigned long long)tv.tv_sec * 1000000llu + (unsigned long long)tv.tv_usec;
-#endif
_period = (unsigned long long)(period * (double)1000000);
if (_period == 0llu) {