* eina: fix gettimeofday usage.

SVN revision: 55197
This commit is contained in:
Cedric BAIL 2010-12-03 16:30:26 +00:00
parent 652f748760
commit fb1c587dde
1 changed files with 9 additions and 1 deletions

View File

@ -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