Your Game loop should look something like this
lastTime = time();
while (!quit)
{
currentTime = time();
deltaTime = currentTime - lastTime;
lastTime = currentTime;
UpdateFrame(deltaTime);
}
For a crossplatform way to get the time check out this project https://github.com/rampantpixels/timer_lib
now this is called a variable time step update if your game involves physics check out this link http://gafferongames.com/game-physics/fix-your-timestep/
and also see this question here When should I use a fixed or variable time step?When should I use a fixed or variable time step?