diff src/com/aurellem/capture/IsoTimer.java @ 56:afc437f637bd

improved formating
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Dec 2011 19:25:27 -0600
parents 6484a820e27d
children 5afa49c5a7d3
line wrap: on
line diff
     1.1 --- a/src/com/aurellem/capture/IsoTimer.java	Sat Dec 03 19:18:38 2011 -0600
     1.2 +++ b/src/com/aurellem/capture/IsoTimer.java	Sat Dec 03 19:25:27 2011 -0600
     1.3 @@ -12,9 +12,9 @@
     1.4   * throttles its physics engine and graphics display. If the
     1.5   * computations involved in running the game are too intense, then the
     1.6   * game will first skip frames, then sacrifice physics accuracy. If
     1.7 - * there are particularly demanding computations, then you may only get
     1.8 - * 1 fps, and the ball may tunnel through the floor or obstacles due
     1.9 - * to inaccurate physics simulation, but after the end of one
    1.10 + * there are particularly demanding computations, then you may only
    1.11 + * get 1 fps, and the ball may tunnel through the floor or obstacles
    1.12 + * due to inaccurate physics simulation, but after the end of one
    1.13   * user-hour, that ball will have traveled one game-mile.
    1.14   *
    1.15   * When we're recording video or audio, we don't care if the game-time
    1.16 @@ -36,32 +36,32 @@
    1.17  
    1.18  public class IsoTimer extends Timer {
    1.19  
    1.20 -	private float framerate;
    1.21 -	private int ticks;
    1.22 +    private float framerate;
    1.23 +    private int ticks;
    1.24  	
    1.25 -	public IsoTimer(float framerate){
    1.26 -		this.framerate = framerate;
    1.27 -		this.ticks = 0;
    1.28 -	}
    1.29 +    public IsoTimer(float framerate){
    1.30 +	this.framerate = framerate;
    1.31 +	this.ticks = 0;
    1.32 +    }
    1.33  	
    1.34 -	public long getTime() {
    1.35 -		return (long) (this.ticks / this.framerate);
    1.36 -	}
    1.37 +    public long getTime() {
    1.38 +	return (long) (this.ticks / this.framerate);
    1.39 +    }
    1.40  	
    1.41 -	public long getResolution() {
    1.42 -		return 1000000000L;
    1.43 -	}
    1.44 +    public long getResolution() {
    1.45 +	return 1000000000L;
    1.46 +    }
    1.47  	
    1.48 -	public float getFrameRate() {
    1.49 -		return this.framerate;
    1.50 -	}
    1.51 +    public float getFrameRate() {
    1.52 +	return this.framerate;
    1.53 +    }
    1.54  	
    1.55 -	public float getTimePerFrame() {
    1.56 -		return (float) (1.0f / this.framerate);
    1.57 -	}
    1.58 +    public float getTimePerFrame() {
    1.59 +	return (float) (1.0f / this.framerate);
    1.60 +    }
    1.61  
    1.62 -	public void update() {this.ticks++;}
    1.63 +    public void update() {this.ticks++;}
    1.64  	
    1.65 -	public void reset() {this.ticks = 0;}
    1.66 +    public void reset() {this.ticks = 0;}
    1.67  
    1.68  }