projects
/
profile
/
ivi
/
eina.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44769aa
)
* eina: fix gettimeofday usage.
author
cedric
<cedric>
Fri, 3 Dec 2010 16:30:26 +0000
(16:30 +0000)
committer
cedric
<cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 3 Dec 2010 16:30:26 +0000
(16:30 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@55197
7cbeb6ba
-43b4-40fd-8cce-
4c39aea84d33
src/lib/eina_counter.c
patch
|
blob
|
history
diff --git
a/src/lib/eina_counter.c
b/src/lib/eina_counter.c
index
daad1f7
..
32d2a2a
100644
(file)
--- 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