need some explanation on this bit of code
hello all, i have a pretty simple bit of code, well i know what it does in all, but i dont get it precisely.
consider the following bit of code :
Code:
void Game::timerUpdate(void)
{
double currentTime ;
currentTime = timeGetTime() - lastTime;
if (currentTime < 33.333 )
return ;
frameCounter++;
lastTime = timeGetTime();
}
that if statement! and the return statement afterward ! what is it doing?
i mean it is supposed to make a delay or sth? if so how is it doing it ?