I\'m looking for a way to save the time in a HH::MM::SS fashion in C++. I saw here that they are many solutions and after a little research I opted for time and
time
You can run continuous clock using following code. It works nicely.
#include #include #include using namespace std; void main() { while(true) { system("cls"); //to clear screen time_t tim; time(&tim); cout << ctime(&tim); Sleep(1); } }