var Log = require('./Log');
var Time = {
now: 0,
prev: 0,
delta: 0,
seconds: 0,
frameNumber: 0,
fpsFrames: 0,
fpsTime: 0,
fps: 0,
fpsFrequency: 3,
paused: false,
verbose: false
};
Time.update = function(delta) {
if (Time.paused) {
return;
}
if (Time.prev === 0) {
Time.prev = Date.now();
}
Time.now = Date.now();
Time.delta = (delta !== undefined) ? delta : (Time.now - Time.prev) / 1000;