new Time()
Class that holds Time information.
Members
-
staticTime.deltaNumber
-
Time in seconds since the last frame.
Example
var t=0.0;
Servant.run(function () {
t += Time.delta;
console.log(t);
},3); -
staticTime.elapsedNumber
-
Elapsed time in seconds since
Servant
started.Example
Servant.run(function(){ console.log(Time.elapsed); },3);
-
staticTime.hasPerfTimeBoolean
-
Flag that indicates if the
window.performance
method exists.
Methods
-
staticTime.clock(){Number}
-
Returns the current clock time.
Returns:
Type Description Number - The current time in seconds.
Example
Servant.run(function(){ console.log(Time.clock()); },3);