Documentation Home

Obtain the remainder when the count for one duration object is divided by the count for another.

template <class Rep1, class Period1, class Rep2, class Period2>
typename common_type<Rep1, Rep2>::type
constexpr operator%(
    const duration<Rep1, Period1>& lhs,
    const duration<Rep2, Period2>& rhs);


duration<CommonRep, Period>(lhs).count() % duration<CommonRep, Period>(rhs).count(), where CommonRep is std::common_type<Rep1,Rep2>::type.


#include <chrono>

See Also