pixelperfectengine.system.timer

Undocumented in source.

Public Imports

core.time
public import core.time;
Undocumented in source.

Members

Classes

CoarseTimer
class CoarseTimer

Implements a coarse timer, that checks the time periodically (e.g. on VSYNC), then calls the delegate if the time assigned to it has been lapsed. Is fast and can effectively test for multiple elements, but is inaccurate which can even fluctuate if tests are done on VSYNC intervals. This will make the duration longer in every case (up to 16.7ms on 60Hz displays), but this still should be accurate enough for many cases. In theory, calls for test can be done separate from VSYNC intervals by running it in its own thread, but that can cause potential race issues. Delegates take the jitter argument, which is the overshoot of the time. Can be suspended for game pausing, etc., while keeping time deltas mostly accurate. Multiple instances of this class can be used to create various effects from suspending the timer.

Static variables

timer
CoarseTimer timer;
Undocumented in source.

Meta