Getting the time elapsed, without frame event?


04-02-2007 23:21:41

Hey, How can I get the time elapsed since the last frame, without using frame event? In c++ ogre, there is root::gettimer() but I can't find that in mogre, i guess because the timer is part of the platform manager? Is there an alternative way to get the time elapsed from ogre?


05-02-2007 11:24:34

Is there a benefit on using Ogre's timer instead of .NET's Stopwatch ? I'll add it if that's the case.


05-02-2007 18:39:16

Well, I don't know of the precision .Net timers offer. I know Ogre's internal timer will use QueryPerformanceTime to get pretty high precision time. But, I think you would be fine using .Net's timers regardless of precision... Anyway, I know Axiom wrapped the QueryPerformance timers in .Net. However, Bekas, I suggest against doing that, as that would tie Mogre even more to Windows :D

In Ogre Eihort, when you wrap it, the timers are now in OgreMain itself, so you can still avoid wrapping the platform manager.


05-02-2007 22:08:04

None, except I prefer to use ogre code over .Net code, so if there is a need I can revert to C++. Ill use the stopwatch till eihort comes out.


05-02-2007 22:35:30

Just realized that stopwatch won't work because it gives me seconds (through the timespan) in int and not a floating variable. :?

None the less ill use the milliseconds instead.