C/C++ Delay C++ Command: Timing Song Lyrics

  • Thread starter Thread starter Lancelot59
  • Start date Start date
  • Tags Tags
    C++ Delay
Click For Summary
A user inquired about a C++ command to delay execution for a specific duration, aiming to synchronize song lyrics output. The suggestion of using the Sleep function was made, which pauses execution for a specified number of milliseconds. Additionally, for Windows applications, a multimedia timer was recommended for higher precision, operating at 1000 Hz compared to the 64 Hz resolution of the Sleep function. A link to relevant Microsoft documentation was provided for further exploration.
Lancelot59
Messages
640
Reaction score
1
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.
 
Technology news on Phys.org
Sleep(number of milliseconds)
 
  • Like
Likes Razi Mudassir
I'll give it try, thanks!
 
Neat, I'll have a look at that too.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
1
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
4
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K