public static member function
<chrono>

std::chrono::duration::min

static constexpr duration min();
Duration minimum value
Returns the minimum value of duration.

The function calls duration_values::min to obtain the minimum value for its internal count object:
1
2
3
static constexpr duration min() {
  return duration_values<rep>::min();
}

Parameters

none.

Return value

A duration object with its lowest possible value.

Example

1
2
3
4
5
6
7
8
9
10
11
// duration::min/max
#include <iostream>
#include <chrono>

int main ()
{
  std::cout << "system_clock durations can represent:\n";
  std::cout << "min: " << std::chrono::system_clock::duration::min().count() << "\n";
  std::cout << "max: " << std::chrono::system_clock::duration::max().count() << "\n";
  return 0;
}
Possible output:
system_clock durations can represent:
min: -9223372036854775808
max: 9223372036854775807


See also