1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Add OS.get_system_time_msec

This commit is contained in:
Maximillian
2015-08-06 10:29:33 -07:00
parent 9d185ccc30
commit 6f9a084ac8
8 changed files with 26 additions and 2 deletions

View File

@@ -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 {