Use performance.now() instead of new Date() for JS timers
This commit is contained in:
@@ -177,7 +177,7 @@ class Timer {
|
||||
#elseif (neko || php)
|
||||
return Sys.time();
|
||||
#elseif js
|
||||
return Date.now().getTime() / 1000;
|
||||
return js.Browser.window.performance.now () / 1000;
|
||||
#elseif cpp
|
||||
return untyped __global__.__time_stamp();
|
||||
#elseif python
|
||||
|
||||
Reference in New Issue
Block a user