This is a generic timer class that can be initialized in 3 modes, to run once, cycle and cycle in a ping-pong manner. You can set its duration and query it by the float conversion operator (which also doubles as a state update function). The returned value is the normalized interval (values in the [0.0, 1.0] range), which can be directly used for interpolation tasks. The isRunning() method can be used to check whether the timer has expired (or is stopped).