Documentation Home

Create a new duration object where the internal count is the remainder when the count for the given object is divided by the specified value.

template <class Rep1, class Period, class Rep2>
duration<typename common_type<Rep1, Rep2>::type, Period>
constexpr operator%(
    const duration<Rep1, Period>& d, const Rep2& s);

Returns:

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

Returns:

*this

Header

#include <chrono>

See Also