summaryrefslogtreecommitdiff
path: root/drivers/unix/os_unix.cpp
diff options
context:
space:
mode:
authorxodene <maximillian.pol@gmail.com>2015-08-06 11:08:48 -0700
committerxodene <maximillian.pol@gmail.com>2015-08-06 11:08:48 -0700
commit6b25e83ba73ae3321aff00d7b3192d8cd80c410c (patch)
tree0b990031f25968327001fe3190ea64569c473d2f /drivers/unix/os_unix.cpp
parent6f9a084ac8a820450632f17384161c6a24da86d3 (diff)
tested and fixed unix os_system_time_msec()
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r--drivers/unix/os_unix.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 1afd0be61d..314e13cee4 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -225,8 +225,9 @@ uint64_t OS_Unix::get_unix_time() const {
uint64_t OS_Unix::get_system_time_msec() const {
struct timeval tv_now;
- gettimeofday(&tv_now, null);
- uint64_t msec = tv_now.tv_.sec / 1000;
+ gettimeofday(&tv_now, NULL);
+ localtime(&tv_now.tv_usec);
+ uint64_t msec = tv_now.tv_usec/1000;
return msec;
}