Using Chrono to measure time

Boost Chrono is a library for time calculations having some overlapping functionality with the Posix Time part of the Date Time library. Like Posix Time, Chrono too uses the notion of time points and durations. Chrono does not deal with dates. It is a newer library than Date Time, and implements the facilities proposed in a paper from the C++ Standards Committee working group (WG21). Parts of that proposal made it to the C++11 Standard Library as the Chrono library, and much of the discussion on Boost Chrono also applies to Chrono Standard Library (std::chrono).

Durations

A duration represents an interval of time. The duration has a numeric magnitude and must be expressed in units of time. The boost::chrono::duration ...

Get Learning Boost C++ Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.