std::chrono::duration_values::zero

static constexpr Rep zero(); Returns a zero-length representation. Parameters (none). Return value returns Rep(0). See also zero [static] returns the special duration value zero (public static member function of std::chrono::duration) min [static] returns the smallest possible representation (public static member function) max [static] returns the largest possible representation (public static member function)

std::chrono::duration_values::min

static constexpr Rep min(); Returns the lowest possible representation. Parameters (none). Return value returns std::numeric_limits<Rep>::lowest(). See also min [static] returns the special duration value min (public static member function of std::chrono::duration) zero [static] returns a zero-length representation (public static member function) max [static] returns the largest possible representation (public static member function)

std::chrono::duration_values::max

static constexpr Rep max(); Returns the largest possible representation. Parameters (none). Return value returns std::numeric_limits<Rep>::max(). See also max [static] returns the special duration value max (public static member function of std::chrono::duration) zero [static] returns a zero-length representation (public static member function) min [static] returns the smallest possible representation (public static member function)

std::chrono::duration_values

Defined in header <chrono> template <class Rep> struct duration_values; (since C++11) The std::chrono::duration_values type defines three common durations: std::chrono::duration_values::zero std::chrono::duration_values::min std::chrono::duration_values::max The zero, min, and max methods in std::chrono::duration forward their work to these methods. This type can be specialized if the representation Rep requires a specific implementation to return these durati

std::chrono::duration_cast

template <class ToDuration, class Rep, class Period> constexpr ToDuration duration_cast(const duration<Rep,Period>& d); (since C++11) Converts a std::chrono::duration to a duration of different type ToDuration. No implicit conversions are used. Multiplications and divisions are avoided where possible, if it is known at compile time that one or more parameters are 1. Computations are done in the widest type available and converted, as if by static_cast, to the result type

std::chrono::duration::zero

static constexpr duration zero(); Returns a zero-length duration. If the representation rep of the duration requires some other implementation to return a zero-length duration, std::chrono::duration_values can be specialized to return the desired value. Parameters (none). Return value returns std::chrono::duration(std::chrono::duration_values<rep>::zero()). See also min [static] returns the special duration value min (public static member function) max [static]

std::chrono::duration::operators (unary)

constexpr duration operator+() const; (1) constexpr duration operator-() const; (2) Implements unary plus and unary minus for the durations. If rep_ is a member variable holding the number of ticks in a duration object, 1) Equivalent to return *this; 2) Equivalent to return duration(-rep_); Parameters (none). Return value 1) a copy of this duration object 2) a copy of this duration object, with the number of ticks negated Example #include <chrono> #include &

std::chrono::duration::operators (%=)

duration& operator+=(const duration& d); (1) duration& operator-=(const duration& d); (2) duration& operator*=(const rep& rhs); (3) duration& operator/=(const rep& rhs); (4) duration& operator%=(const rep& rhs); (5) duration& operator%=(const duration& rhs); (6) Performs compound assignments between two durations with the same period or between a duration and a tick count value. If rep_ is the member variable

std::chrono::duration::operators

duration& operator++(); (1) duration operator++(int); (2) duration& operator--(); (3) duration operator--(int); (4) Increments or decrements the number of ticks for this duration. If rep_ is a member variable holding the number of ticks in a duration object, 1) Equivalent to ++rep_; return *this; 2) Equivalent to return duration(rep_++) 3) Equivalent to --rep_; return *this; 4) Equivalent to return duration(rep_--); Parameters (none). Return value

std::chrono::duration::min

static constexpr duration min(); Returns a duration with the lowest possible value. If the representation rep of the duration requires some other implementation to return a minimum-length duration, std::chrono::duration_values can be specialized to return the desired value. Parameters (none). Return value returns std::chrono::duration(std::chrono::duration_values<rep>::min()). See also zero [static] returns the special duration value zero (public static member funct