#include iostream #include time.husing namespace std; int main() { time_t myt=time(NULL); cout"sizeof(time_t) is:"sizeof(time_t)endl; cout"myt is:"mytendl; time_t t; time(t); cout"t is:"tendl; } g++ -std=c++11 chrono_linux.cpp -o chrono_lin
#include <iostream>
#include <time.h>using namespace std;
int main()
{
time_t myt=time(NULL); cout<<"sizeof(time_t) is:"<<sizeof(time_t)<<endl;
cout<<"myt is:"<<myt<<endl; time_t t;
time(&t); cout<<"t is:"<<t<<endl;
}
g++ -std=c++11 chrono_linux.cpp -o chrono_linux