c++ timer
#include <iostream>
#include <chrono>
// This is how to measure the time it takes functions to finish
long add(int a, int b) {
return a + b;
}
int main() {
auto start = std::chrono::steady_clock::now();
std::cout << "9 + 10 = " << add(9, 10) << '\n';
auto end = std::chrono::steady_clock::now();
std::chrono::duration<double> elapsed_seconds = end - start;
std::cout << "elapsed time to compute 9 + 10: " << elapsed_seconds.count() << "s\n";
return 0;
}