summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-29 03:41:34 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-29 03:41:34 +0300
commit68f595ca6c7883e030947b7f95c50e92aa733f2b (patch)
tree68941c1831fcf9bfb09546617d0fa8ed81ebe1ef
parent51a06b3c44509c72279b5cfcf2b52b9a35c461b0 (diff)
GetTimeInMillis: use correct units for clock_gettime
Make sure we're treating the nanoseconds as a long, not an int, so we don't overflow.
-rw-r--r--os/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/utils.c b/os/utils.c
index 7d258a444..c7a8964ef 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -552,7 +552,7 @@ GetTimeInMillis(void)
#ifdef MONOTONIC_CLOCK
struct timespec tp;
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
- return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000);
+ return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000L);
#endif
X_GETTIMEOFDAY(&tv);