The Timer class acts as a global time measurement that can be accessed from various parts of the engine. These three values are representation of the same underlying calculus: tmod, dt, fps
Static variables
staticread onlyelapsedTime:Float = 0.
The amount of time (unsmoothed) that was spent since the last frame.
staticread onlylastTimeStamp:Float = haxe.Timer.stamp()
The last timestamp in which update() function was called.
staticmaxDeltaTime:Float = 0.5
The maximum amount of time between two frames (in seconds). If the time exceed this amount, Timer will consider these lags are to be ignored. Default : 0.5
staticsmoothFactor:Float = 0.95
The smoothing done between frames. A smoothing of 0 gives "real time" values, higher values will smooth the results for tmod/dt/fps over frames using the formula dt = lerp(elapsedTime, dt, smoothFactor) Default : 0 on HashLink, 0.95 on other platforms
statictmod:Float
The smoothed frame modifier, based on wantedFPS. Its value is the same as dt/wantedFPS Allows to express movements in terms of pixels-per-frame-at-wantedFPS instead of per second.
staticwantedFPS:Float = 60.
The FPS on which "tmod" have values are based on. Can be freely configured if your gameplay runs at a different speed. Default : 60