How can I set timeout in C++?
// -------------------------
system("..."); // this code run another C++ program using ubuntu terminal.
// this code could be stuck in a loop
// -------------------------
How can I set some function or something to check whether another code took too long or not so that it can kill it.