Time scalor

Can anyone tell me how I can put a time scalor into the game to add to all of my animates, movements etc. I did this once before but I forgot how exactly I did it.

I think I calculated how much time as passed a given frame and used that value, multiplying it across everything.

Has someone done this before? Let me know


You can specify all movements in units per second. Then use a timerfunction to get the time since last frame, normalize the time to one second (timervariable = 1.0 means one second, =0.2 means two tenths of a second since last frame), and multiply all movement vectors with this constant.

How can I get the time in milliseconds??

DWORD milliseconds = timeGetTime(); works more than well.

I did this but it was extremely slow!!

What was slow? Calling timeGetTime or multiplying the time factor with all movement vectors?