#include <iostream>
#include <chrono>
using namespace std;
using namespace std::chrono;
// g++ -O0 -std=c++11 chrono.cpp -o chrono
int main()
{
// cout << system_clock::period::den << endl;
// cout << high_resolution_clock::period::den << endl;
auto start_time = high_resolution_clock::now();
time_t str_time = high_resolution_clock::to_time_t(start_time);
cout << ctime(&str_time) << endl; // std::ctime
cout << (unsigned)high_resolution_clock::now().
time_since_epoch().count() << endl; // seed for random
int temp;
for (int i = 0; i < 242000000; i++)
temp += temp + 1;
auto end_time = high_resolution_clock::now();
cout << duration_cast<seconds>
(end_time - start_time).count() << " seconds\n";
cout << duration_cast<microseconds>
(end_time - start_time).count() << " microseconds\n";
cout << duration_cast<nanoseconds>
(end_time - start_time).count() << " nanoseconds\n";
return 0;
}