From: cedric Date: Fri, 3 Dec 2010 16:30:26 +0000 (+0000) Subject: * eina: fix gettimeofday usage. X-Git-Tag: submit/2.0alpha-wayland/20121127.222009~886 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ea2b6ae8c7383f911f3f7071e8c031ded129b10;p=profile%2Fivi%2Feina.git * eina: fix gettimeofday usage. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@55197 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/eina_counter.c b/src/lib/eina_counter.c index daad1f7..32d2a2a 100644 --- a/src/lib/eina_counter.c +++ b/src/lib/eina_counter.c @@ -87,7 +87,15 @@ _eina_counter_time_get(Eina_Nano_Time *tp) # elif defined(CLOCK_REALTIME) return clock_gettime(CLOCK_REALTIME, tp); # else - return gettimeofday(tp, NULL); + struct timeval tv; + + if (gettimeofday(tp, NULL)) + return -1; + + tp->tv_sec = tv.tv_sec; + tp->tv_nsec = tv.tv_usec * 1000L; + + return 0; # endif } #else