getRealTime question
Posted: Wed Aug 15, 2007 3:44 pm
Here is a tiny snippet of code:
in mainLoop im doing:
totalMilliPassed+=millisecondsPassed;
I print the value out every so often to watch time pass. I am seeing the time passing slower then it should as measured by calls to this every so often:
Should these numbers not be changing at the same rate?
I am seeing a 8 second time block in ctime and a 5 second time block in the other one.
Am I missing something?
Code: Select all
timeNow=myGameDevice->getTimer()->getRealTime();
game->mainLoop(timeNow-timeLastMainUpdate);
timeLastMainUpdate=myGameDevice->getTimer()->getRealTime();
totalMilliPassed+=millisecondsPassed;
I print the value out every so often to watch time pass. I am seeing the time passing slower then it should as measured by calls to this every so often:
Code: Select all
time_t rawtime;
time ( &rawtime );
printf ( "The current local time is: %s", ctime (&rawtime) );
I am seeing a 8 second time block in ctime and a 5 second time block in the other one.
Am I missing something?