decrease drawing frequency; should fix high CPU usage (#16)

This commit is contained in:
Olaf Leidinger 2014-10-21 21:42:13 +02:00
parent f7f33360b6
commit 5153e81064

View File

@ -290,7 +290,7 @@ const TeaTime = new Lang.Class({
this._bGraphicalCountdown = this._settings.get_boolean(Utils.TEATIME_GRAPHICAL_COUNTDOWN_KEY); this._bGraphicalCountdown = this._settings.get_boolean(Utils.TEATIME_GRAPHICAL_COUNTDOWN_KEY);
let dt = this._bGraphicalCountdown let dt = this._bGraphicalCountdown
? Math.max(0.1, time / 180) // set time step to fit animation ? Math.max(1.0, time / 90) // set time step to fit animation
: 1.0; // show every second for the textual countdown : 1.0; // show every second for the textual countdown
this._stopTime.setTime(this._startTime.getTime() + time*1000); // in msec this._stopTime.setTime(this._startTime.getTime() + time*1000); // in msec