首页 > 代码库 > OSG计时器与时间戳

OSG计时器与时间戳

static osg::Timer* sendMsgTimer = new osg::Timer;
if (sendMsgTimer->time_m()>100)//100ms
{
// do what you want
sendMsgTimer->setStartTick();//重置
}

 

osg::NodeVisitor* nv

nv->getFrameStamp()->getReferenceTime();

OSG计时器与时间戳