package com.haxademic.core.system;

import processing.core.PApplet;

public class TimeFactoredFps {
	
	protected PApplet p;
	protected float _targetFps;
	protected float _timeFactor;
	protected float _actualFps;
	protected float _lastTime;
	
	public TimeFactoredFps( PApplet p, float targetFps ) {
		this.p = p;
		_targetFps = targetFps;
		_timeFactor = 1;
		_actualFps = targetFps;
		_lastTime = p.millis();
	}
	
	public float targetFps() {
		return _targetFps;
	}
	
	public float actualFps() {
		return _actualFps;
	}
	
	public float multiplier() {
		return _timeFactor;
	}
	
	public void update() {
		_actualFps = 1000f / ( p.millis() - _lastTime );
		_timeFactor = _targetFps / _actualFps;
		_lastTime = p.millis();
	}
}	

@@ -29,16 +29,68 @@
 ystem;%0A%0A
+import com.haxademic.core.math.easing.EasingFloat;%0A%0A
 import p
@@ -113,16 +113,16 @@
 Applet;%0A
-
 %0Apublic 
@@ -228,16 +228,57 @@
 Factor;%0A
+%09protected EasingFloat _timeFactorEased;%0A
 %09protect
@@ -443,16 +443,61 @@
 or = 1;%0A
+%09%09_timeFactorEased = new EasingFloat(1, 20);%0A
 %09%09_actua
@@ -705,24 +705,98 @@
 actor;%0A%09%7D%0A%09%0A
+%09public float multiplierEased() %7B%0A%09%09return _timeFactorEased.value();%0A%09%7D%0A%09%0A
 %09public void
@@ -858,16 +858,16 @@
 Time );%0A
-
 %09%09_timeF
@@ -895,24 +895,96 @@
 _actualFps;%0A
+%09%09_timeFactorEased.setTarget(_timeFactor);%0A%09%09_timeFactorEased.update();%0A
 %09%09_lastTime 

Add eased time update