Delay C++ Command: Timing Song Lyrics

  • Context: C/C++ 
  • Thread starter Thread starter Lancelot59
  • Start date Start date
  • Tags Tags
    C++ Delay
Click For Summary

Discussion Overview

The discussion revolves around finding a C++ command that can delay the execution of commands for a specified duration, specifically for the purpose of outputting song lyrics at the correct timing. The scope includes programming techniques and potential solutions for timing in C++.

Discussion Character

  • Technical explanation

Main Points Raised

  • One participant inquires about a C++ command for delaying command execution.
  • Another participant suggests using the Sleep function to achieve the delay in milliseconds.
  • A different participant proposes considering a multi-media timer for higher resolution timing on Windows systems, noting the difference in frequency between the Sleep function and the multi-media timer.
  • There is an acknowledgment of the suggestion to explore the multi-media timer for better timing accuracy.

Areas of Agreement / Disagreement

Participants have not expressed disagreement, but there are multiple approaches suggested regarding timing methods in C++.

Contextual Notes

The discussion does not address potential limitations of the Sleep function or the multi-media timer, nor does it clarify the specific requirements for timing accuracy in the context of song lyrics.

Who May Find This Useful

Programmers interested in timing functions in C++, particularly those working on projects involving audio or synchronized outputs.

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   Reactions: Razi Mudassir
I'll give it try, thanks!
 
Neat, I'll have a look at that too.
 

Similar threads

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