int main()
{
time_t start, end;
time(&start); // start time
// {your code goes here}
time(&end); // end time
double time_taken = double(end - start); // calulate diffrence
std::cout << " duration: " << time_taken << " s
";
}
#include <chrono>
using namespace std::chrono;
auto start = high_resolution_clock::now();
// code
auto stop = high_resolution_clock::now();