Archived

This topic is now archived and is closed to further replies.

Muffinwoman

How to make timedelay?

Recommended Posts

Hi! I hope somebody can help me understand how to make timedelays (with duration about 1-3 sec.), so as to get a figure to evolve in time. btw. I use MS Visual C++ in combination with GLUT / OpenGL... thanx!But I don't mean movement. Just kind of a figure getting bigger while you watch... like one kube exist and after 3 sec you see one more...and so on... will the same do? And how do you get frametime? [edited by - Muffinwoman on March 18, 2003 11:47:03 AM] [edited by - Muffinwoman on March 18, 2003 12:25:48 PM] [edited by - Muffinwoman on March 18, 2003 12:27:31 PM] [edited by - Muffinwoman on March 18, 2003 12:33:36 PM]

Share this post


Link to post
Share on other sites
use GetTickCount it checks the time from the system clock i think then you just check it every loop through the program and when it gets to 3000??? (i think its in mili secounds) from the original time update.

Share this post


Link to post
Share on other sites
Sleep() is prolly what you're looking for.
[EDIT:] Except you wouldn't be able to "watch the figure getting bigger". You'd have to use GetTickCount() or timeGetTime() for that. You might also wanna look into the SetTimer function.

[edited by - AdmiralBinary on March 18, 2003 11:52:30 PM]

Share this post


Link to post
Share on other sites