diff src/com/aurellem/capture/IsoTimer.java @ 62:f5e52169f056

updated to work with new jme changes
author Robert McIntyre <rlm@mit.edu>
date Wed, 14 Dec 2011 17:43:52 -0700
parents 5afa49c5a7d3
children ddb300c5335f
line wrap: on
line diff
     1.1 --- a/src/com/aurellem/capture/IsoTimer.java	Sat Dec 03 23:49:14 2011 -0600
     1.2 +++ b/src/com/aurellem/capture/IsoTimer.java	Wed Dec 14 17:43:52 2011 -0700
     1.3 @@ -36,32 +36,32 @@
     1.4  
     1.5  public class IsoTimer extends Timer {
     1.6  
     1.7 -    private float framerate;
     1.8 -    private int ticks;
     1.9 -	
    1.10 -    public IsoTimer(float framerate){
    1.11 -	this.framerate = framerate;
    1.12 -	this.ticks = 0;
    1.13 -    }
    1.14 -	
    1.15 -    public long getTime() {
    1.16 -	return (long) (this.ticks / this.framerate);
    1.17 -    }
    1.18 -	
    1.19 -    public long getResolution() {
    1.20 -	return 1000000000L;
    1.21 -    }
    1.22 -	
    1.23 -    public float getFrameRate() {
    1.24 -	return this.framerate;
    1.25 -    }
    1.26 -	
    1.27 -    public float getTimePerFrame() {
    1.28 -	return (float) (1.0f / this.framerate);
    1.29 -    }
    1.30 +	private long framerate;
    1.31 +	private int ticks;
    1.32  
    1.33 -    public void update() {this.ticks++;}
    1.34 -	
    1.35 -    public void reset() {this.ticks = 0;}
    1.36 +	public IsoTimer(float framerate){
    1.37 +		this.framerate = (long) framerate;
    1.38 +		this.ticks = 0;
    1.39 +	}
    1.40 +
    1.41 +	public long getTime() {
    1.42 +		return this.ticks;
    1.43 +	}
    1.44 +
    1.45 +	public long getResolution() {
    1.46 +		return (long) framerate;
    1.47 +	}
    1.48 +
    1.49 +	public float getFrameRate() {
    1.50 +		return this.framerate;
    1.51 +	}
    1.52 +
    1.53 +	public float getTimePerFrame() {
    1.54 +		return (float) (1.0f / this.framerate);
    1.55 +	}
    1.56 +
    1.57 +	public void update() {this.ticks++;}
    1.58 +
    1.59 +	public void reset() {this.ticks = 0;}
    1.60  
    1.61  }