add a timer c++ code example
Example: add a timer c++
# include <windows.h>
# include <iostream>
using namespace std;
void timer(int sec)
{
Sleep(sec*1000);
}
int main()
{
cout << "Wait 5 seconds " << endl;
timer(5);
cout << "FireWorks !" << endl;
return 0;
}