0

I'm looking for a cross platform (non-threaded or lightweight callback?) timeout for waiting on user input. A simple use case being a service resumes unless interrupted every given epoch.

Ideally a solution interface similar to the following would be great (Up to C++ 17 non experimental solution is acceptable):

std::string confirm = "";
std::string timeoutFallbackValue = "noExit";
std::double timeoutSeconds = 10.0;
std::cin.get(timeoutSeconds , timeoutFallbackValue) >> confirm;

Note: this is through CLI (No GUI's)

0 Answers0