瀏覽代碼

Cosmetics

Dominic Szablewski 12 年之前
父節點
當前提交
3dbbcb99b8
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      jsmpg.js

+ 5 - 3
jsmpg.js 查看文件

@@ -405,7 +405,7 @@ jsmpeg.prototype.scheduleNextFrame = function() {
405 405
 	var wait = Math.max(0, (1000/this.pictureRate) - this.lateTime);
406 406
 	this.targetTime = Date.now() + wait;
407 407
 
408
-	if(this.benchmark) {
408
+	if( this.benchmark ) {
409 409
 		var now = Date.now();
410 410
 		if(!this.benchframe) {
411 411
 			this.benchstart = now;
@@ -413,9 +413,11 @@ jsmpeg.prototype.scheduleNextFrame = function() {
413 413
 		}
414 414
 		this.benchframe++;
415 415
 		var timepassed = now - this.benchstart;
416
-		if(this.benchframe >= 100) {
416
+		if( this.benchframe >= 100 ) {
417 417
 			this.benchfps = (this.benchframe / timepassed) * 1000;
418
-			if(console) console.log("frames per second: " + this.benchfps);
418
+			if( console ) {
419
+				console.log("frames per second: " + this.benchfps);
420
+			}
419 421
 			this.benchframe = null;
420 422
 		}
421 423
 		setTimeout( this.nextFrame.bind(this), 0);