write c++ program to create process and wait for 15 seconds then terminate it. path: "c:\\windows\\system32\\notepad.exe"
#include <iostream>
#include <chrono>
#include <thread>
using namespace std;
int main()
{
cout << "Hello I'm waiting...." << endl;
this_thread::sleep_for(chrono::milliseconds(15000) );
cout << "Waited 15000 ms\n";
}
Comments
Leave a comment