From 8e40194ee25a951a63e60b21ba06e7dd6b53876e Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Tue, 1 Oct 2013 10:03:05 +0900 Subject: [PATCH] Do not use the clock_gettime for compensating period Change-Id: Ib7295782bea879b5379e199635b5eec2247cb280 --- src/util.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/util.c b/src/util.c index 6871ccf..b3a53c3 100644 --- a/src/util.c +++ b/src/util.c @@ -171,6 +171,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) { @@ -178,17 +179,12 @@ HAPI double util_time_delay_for_compensation(double period) return 0.0f; } -#if defined(_USE_ECORE_TIME_GET) - curtime = ecore_time_get() * 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) { -- 2.7.4