Hi,maybe you can try function time() to get the system time.
A simple example is shown as follows:
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
time_t tmpTime;
time(&tmpTime);
cout<<"The time is "<<ctime(&tmpTime)<<endl;
return 0;
}
Good luck!