diff options
author | Mariano Javier Suligoy <marianognu.easyrpg@gmail.com> | 2015-08-09 16:33:02 -0300 |
---|---|---|
committer | Mariano Javier Suligoy <marianognu.easyrpg@gmail.com> | 2015-08-09 16:33:02 -0300 |
commit | 3a83337420c3e6c7e5f3a52cee49aa2eb17cab2d (patch) | |
tree | 7560fb0b3caf599e7181e17edce12616a58cdf73 /drivers/unix/os_unix.cpp | |
parent | c88038228ae9b5c53d5d7ff3f1d99ac0adbc30eb (diff) | |
parent | c2e2f2e0aebf6342e6f18ae5d67b6a825590675a (diff) | |
download | redot-engine-3a83337420c3e6c7e5f3a52cee49aa2eb17cab2d.tar.gz |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r-- | drivers/unix/os_unix.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index f6d9e0fb4e..314e13cee4 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -223,6 +223,14 @@ 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); + localtime(&tv_now.tv_usec); + uint64_t msec = tv_now.tv_usec/1000; + return msec; +} + OS::Date OS_Unix::get_date(bool utc) const { |