Search:
Forum
Beginners
Controlling speed of a program
Controlling speed of a program
Feb 24, 2012 at 5:13am UTC
Pirogun
(18)
I would like to know how I can make a program print a line that is timed so it isn't all at once confusing the user
Feb 24, 2012 at 5:50am UTC
oonej
(208)
sleep(<time in ms>)
for
(time_t t = time() + 5; time() < t; ) {}
google is your friend :) usually provide faster responses
Feb 24, 2012 at 11:47pm UTC
Pirogun
(18)
Sorry for being sooo late, but why do I need the for statement
Feb 24, 2012 at 11:56pm UTC
hanst99
(2869)
That's basically a loop that repeats until a certain time is reached, the problem here this will call time() as often as your processor or your OS will allow it, which is a huge waste of resources.
Feb 24, 2012 at 11:57pm UTC
Pirogun
(18)
is there a better way
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs