wait - How use `cin` to pause the program for 10 seconds in C++ -


exacly stated in subject: how use cin wait(pause program) 10 seconds in c++. make act simiral java's thread.wait.

edit: asking cin

that not way cin works, has no notion of timeouts.

what want is, mentioned java, pause thread. can done in several ways...

  • c++11: std::this_thread::sleep_for(std::chrono::seconds(10));
  • posix (linux et al.): sleep(10);
  • windows: sleep(10000); (in milliseconds)

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -