mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 23:42:23 -05:00
17 lines
343 B
JavaScript
17 lines
343 B
JavaScript
|
var Timer = require('../util/timer');
|
||
|
|
||
|
function Clock () {
|
||
|
this._projectTimer = new Timer();
|
||
|
this._projectTimer.start();
|
||
|
}
|
||
|
|
||
|
Clock.prototype.projectTimer = function () {
|
||
|
return this._projectTimer.timeElapsed() / 1000;
|
||
|
};
|
||
|
|
||
|
Clock.prototype.resetProjectTimer = function () {
|
||
|
this._projectTimer.start();
|
||
|
};
|
||
|
|
||
|
module.exports = Clock;
|