Here's something that you can do to speed things up (and make speed-testing more accurate), but is only going to work in an actual terminal or console which many novice users are not comfortable using. I say try to cut out the user from the speed equation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// includes and using namespace, etc.
int main(int argc, char ** argv)
if(argc == 2)
ss << argv;
ss >> seconds;
// get seconds via cin and cout, or explain how to use the program from console and exit
// you can get piped input from a script if you accept cin input at this point.
// continue with your code from there...
The user could then provide the argument from outside the program, instead of holding up its execution time.