Daily bit(e) of C++ | std::chrono - measuring time
Daily bit(e) of C++ ♻️73, Measuring time using the C++11 std::chrono library.
The std::chrono library added in C++11 enables simple time measurement.
The library provides two types for storing time information: time points and durations. The representation of time points is dictated by the source clock. Durations are, by default, integer-based fixed-point numbers (value + fraction).
std::chrono supports the expected time manipulation operations, time literals (C++14), iostream and std::format formatting (C++20).