소스 검색

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);