From Jason Turner
Watch on YouTube

Summary

This episode provides a quick introduction to the std::chrono library, highlighting its evolution from C++11 to C++20's calendar and formatting capabilities. Jason demonstrates key chrono features including different clock types (system_clock, utc_clock, steady_clock), duration measurements, date/time manipulation, and the strongly-typed nature of the library. The example showcases how to get current time, truncate to days, add/subtract time intervals, measure code execution duration, and format output using C++20's std::format integration.

Resources

Tags