this.tick_duration = 25; .... this.now = new Date().getTime(); // Drawing... this.time_to_paint = (new Date().getTime()) - this.now; this.load = Math.round((this.time_to_paint / this.tick_duration) * 100);