Changed the osgviewer example to use the osg::Timer::instance instead a loca

instance.
This commit is contained in:
Robert Osfield
2004-02-01 17:19:33 +00:00
parent b79c340922
commit db02810270

View File

@@ -55,8 +55,7 @@ int main( int argc, char **argv )
return 1;
}
osg::Timer timer;
osg::Timer_t start_tick = timer.tick();
osg::Timer_t start_tick = osg::Timer::instance()->tick();
// read the scene from the list of file specified commandline args.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
@@ -77,9 +76,9 @@ int main( int argc, char **argv )
arguments.writeErrorMessages(std::cout);
}
osg::Timer_t end_tick = timer.tick();
osg::Timer_t end_tick = osg::Timer::instance()->tick();
std::cout << "Time to load = "<<timer.delta_s(start_tick,end_tick)<<std::endl;
std::cout << "Time to load = "<<osg::Timer::instance()->delta_s(start_tick,end_tick)<<std::endl;
// optimize the scene graph, remove rendundent nodes and state etc.
osgUtil::Optimizer optimizer;