Timer question

boyamer

12-08-2009 09:06:16

Anyone knows how to retrieve this values into MOgre:
TotalGameTime: The amount of game time since the start of the game.
TotalRealTime : The amount of real time (wall clock) since the start of the game
ElapsedGameTime : The amount of elapsed game time since the last update
ElapsedRealTime : The amount of elapsed real time (wall clock) since the last frame.

Maybe have them as TimeSpan

AndroidAdam

13-08-2009 03:15:11

The xna classes I gave you should already be putting them in. If they're not working what you can do is use TimeSpan.FromMilliseconds();

In a frame listener add this:

elapsedGame = TimeSpan.FromMilliseconds(evt.timeSinceLastFrame);
totalGame = TimeSpan.FromMilliseconds(root.Timer.Milliseconds);


for real time your on your own, but it's really not that hard to save when the game started and add to it.