Timing in C++

less than 1 minute read

Use the <chrono> library. std::chrono::high_resolution_clock seems to do the trick. It should be giving me nanosecond resolution, but gives me only microsecond resolution. Nevertheless, better than clock() any day!