And maybe in other places too.
Measuring real time in things like animation or status update can cause problems, since it's a major side effect, which we can't turn off.
So we can't implement things like pause, because we can't stop global timer.
Also we can't change animation speed just by altering timer threshold.
Current alternative is presented in the background module, which counts number of times update function was called. This is stub implementation, however.
We should really think about how to decouple Timer and real time measuring.
However, real time measurements of course should be resent somewhere, but ideally there should be only one place, both logically and in sense of source code, where this happens.
And maybe in other places too. Measuring real time in things like animation or status update can cause problems, since it's a major side effect, which we can't turn off. So we can't implement things like pause, because we can't stop global timer. Also we can't change animation speed just by altering timer threshold.
Current alternative is presented in the background module, which counts number of times
update
function was called. This is stub implementation, however.We should really think about how to decouple
Timer
and real time measuring. However, real time measurements of course should be resent somewhere, but ideally there should be only one place, both logically and in sense of source code, where this happens.