You'll get a value which seems similar to Time.time, but you have much more control:

- You can control the rotation with the keyboard. For example, rotate left if the left arrow is pressed or rotate right if the right arrow is pressed.- You can keep track of different rotations for different objects.- If your game pauses but Time.time continues, you can pause your rotation without it jumping ahead when you unpause.

You should have 2 clocks anyway... real time and virtual time, the real time clock keeps ticking when the game is paused. Virtual time only runs when game is running and you can scale it for time control effects too.

If OP is worried about accuracy with a constantly increasing time you can use fmodf to do a floating point modulo style operation so values wrap around at multiples of the periodicity, or just subtract the periodicity when the counter overflows.

EDIT: I also saw an article or blog from a guy a Valve who says they use double precision time but start off at a large value so it keeps the same precision for a long time (something like weeks or months, maybe years), but my google fu failed me.

EDIT3: I'm sure there was something in the blog about starting the time not at zero but I guess I misremembered. Maybe that was in another article in his discussion of floating point stuff, so check the other articles as well.

Edited by Paradigm Shifter, 28 October 2013 - 09:35 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley