summaryrefslogtreecommitdiff
path: root/drivers/unix/os_unix.cpp
diff options
context:
space:
mode:
authorMaximillian <maximillian.pol@gmail.com>2015-08-06 10:29:33 -0700
committerMaximillian <maximillian.pol@gmail.com>2015-08-06 10:29:33 -0700
commit6f9a084ac8a820450632f17384161c6a24da86d3 (patch)
treed4dbca6eb52f61d486dec7398db2a97945c5a8d4 /drivers/unix/os_unix.cpp
parent9d185ccc30ad5fe7eb716390ca2e7f5c06574ce0 (diff)
Add OS.get_system_time_msec
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r--drivers/unix/os_unix.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index f6d9e0fb4e..1afd0be61d 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -223,6 +223,13 @@ uint64_t OS_Unix::get_unix_time() const {
return time(NULL);
};
+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;
+ return msec;
+}
+
OS::Date OS_Unix::get_date(bool utc) const {