View Full Version : C++ Time Delay
Lancelot59
Nov18-09, 09:36 PM
Hi there PF. I was wondering if there was a C++ command that delayed a command being run for a certain period of time. I'm trying to make a program that outputs the lyrics to a song at the right times.
mgb_phys
Nov18-09, 09:47 PM
Sleep(number of milliseconds)
Lancelot59
Nov18-09, 09:51 PM
I'll give it try, thanks!
If this is for windows, you might want to consider using a multi-media timer which is higher resolution (1000 hz versus the typical 64 hz ticker used for the sleep() function).
http://msdn.microsoft.com/en-us/library/ms712704(VS.85).aspx
Lancelot59
Nov19-09, 01:02 AM
Neat, I'll have a look at that too.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.