Time Duration Calculations

This lesson will explain which time duration operations are supported in C++.

We'll cover the following...

The time durations support basic arithmetic operations, meaning you can multiply or divide a time duration by a number. Of course, you can compare time durations. I explicitly want to emphasize that all these calculations and comparisons respect the units.

With the C++14 standard, it gets even better; the C++14 standard supports the typical time literals.

Type Suffix Example
std::chrono::hours
...