c time(NULL) code example
Example: time function c++
#include <chrono>
using namespace std::chrono;
auto start = high_resolution_clock::now();
// perform function to be timed here...
auto stop = high_resolution_clock::now();
cout << duration_cast<microseconds>(stop - start).count() << endl;