From 3dbbcb99b8c1aae2bafd3f7ff5b3137fdea3f0ae Mon Sep 17 00:00:00 2001 From: Dominic Szablewski Date: Thu, 21 Nov 2013 12:55:37 +0100 Subject: [PATCH] Cosmetics --- jsmpg.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jsmpg.js b/jsmpg.js index 6942a87f..45288cca 100755 --- a/jsmpg.js +++ b/jsmpg.js @@ -405,7 +405,7 @@ jsmpeg.prototype.scheduleNextFrame = function() { var wait = Math.max(0, (1000/this.pictureRate) - this.lateTime); this.targetTime = Date.now() + wait; - if(this.benchmark) { + if( this.benchmark ) { var now = Date.now(); if(!this.benchframe) { this.benchstart = now; @@ -413,9 +413,11 @@ jsmpeg.prototype.scheduleNextFrame = function() { } this.benchframe++; var timepassed = now - this.benchstart; - if(this.benchframe >= 100) { + if( this.benchframe >= 100 ) { this.benchfps = (this.benchframe / timepassed) * 1000; - if(console) console.log("frames per second: " + this.benchfps); + if( console ) { + console.log("frames per second: " + this.benchfps); + } this.benchframe = null; } setTimeout( this.nextFrame.bind(this), 0);