O'Reilly logo

The C++ Programming Language, Fourth Edition by Bjarne Stroustrup

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

35. Utilities

The time you enjoy wasting is not wasted time.

– Bertrand Russell

Introduction

Time

duration; time_point; Clocks; Time Traits

Compile-Time Rational Arithmetic

Type Functions

Type Traits; Type Generators

Minor Utilities

move() and forward(); swap(); Relational Operators; Comparing and Hashing type_info

Advice

35.1. Introduction

The standard library provides many “utility components” that are so widely useful that they are not easily classified as part of some major standard-library component.

35.2. Time

In <chrono>, the standard library provides facilities for dealing with time durations and time points. All chrono facilities are in the std::chrono (sub)namespace, so we have to either explicitly qualify with chrono:: ...

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