O'Reilly logo

C++ Concurrency in Action: Practical Multithreading by Anthony Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix D. C++ Thread Library reference

D.1. The <chrono> header

The <chrono> header provides classes for representing points in time and durations and clock classes, which act as a source of time_points. Each clock has an is_steady static data member, which indicates whether it’s a steady clock that advances at a uniform rate (and can’t be adjusted). The std::chrono::steady_clock class is the only clock guaranteed to be steady.

Header contents

namespace std
{
   namespace chrono
   {
       template<typename Rep,typename Period = ratio<1>>
       class duration;
       template<
            typename Clock,
            typename Duration = typename Clock::duration>
       class time_point;
       class system_clock;
       class steady_clock;
       typedef unspecified-clock-type high_resolution_clock;
   }
}

D.1.1. std::chrono::duration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required