C++ includes the Chrono APIs which, mostly, provide C++ wrappers around the POSIX time.h APIs. For this reason, some time.h functions are still needed to provide full functionality, including the conversion to standard C strings. It should be noted that although some additions have been made in C++17 (specifically floor(), ceil(), and round()), the Chrono APIs are expected to see a relatively large overhaul with the introduction of C++20, which is outside the scope of this book. For this reason, the C++ Chrono APIs are briefly explained in this section to provide an overview of the current APIs.
Exploring C++ Chrono APIs
The system_clock() API
The std::chrono::system_clock{} API is similar to time() in that it is capable...