/usr/share/cinnamon/js/misc/timers.js is in cinnamon-common 3.6.7-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
function DebugTimer(name){
this._init(name);
}
DebugTimer.prototype = {
_init: function(name) {
this.name = name;
this.start_time = 0;
},
start: function() {
let date = new Date();
this.start_time = date.getTime();
log("Debug timer __" + this.name + "__ started.");
},
stop: function() {
let date = new Date();
let diff = date.getTime() - this.start_time;
log("Debug timer __" + this.name + "__ stopped at * " + diff.toString() + "ms *")
this.start_time = 0;
}
};
|