Paul Melis wrote:
J.P. Delport wrote:
In OSG you could do something like:
osg::Timer *globalHighResTimer=osg::Timer::instance();
uint64_t currentTimeNanoSec()
{
osg::Timer_t timer_t=globalHighResTimer->tick();
return (uint64_t)(timer_t *
globalHighResTimer->getSecondsPerTick() * 1000000000);//timerTick *
secondsPerTick * secondsToNanoSeconds
}
This is win32-specific code right? There's no way you're going to get
nanosecond precision on e.g. Linux where gettimeofday() is used by
osg::Timer.
Ok ok, it would give valid results on non-windows, but give a false
sense of nanosecond precision. And the OP needed only milliseconds...
Paul
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org