1
0
web/static/pkg/solar/js/time.js

18 lines
380 B
JavaScript
Raw Normal View History

2024-04-28 11:09:32 +00:00
var globalTimeFlag = true;
var globalTime = {
absolute: 0,
relative: 0,
scale: 1.,
getAbsolute: function () { return this.absolute; },
getRelative: function () { return this.relative; }
};
window.setInterval(function () {
if (globalTimeFlag) {
globalTime.relative += 0.001 * globalTime.scale;
globalTime.absolute += 0.001;
}
}, 10);