Share via


operator* Operator (STL)

Multiplication operator for duration objects.

template<class Rep1, class Period1, class Rep2>
   constexpr duration<typename common_type<Rep1, Rep2>::type, Period1>
   operator*(const duration<Rep1, Period1>& Dur, const Rep2& Mult);
template<class Rep1, class Rep2, class Period2>
   constexpr duration<typename common_type<Rep1, Rep2>::type, Period2>
   operator*(const Rep1& Mult, const duration<Rep2, Period2>& Dur);

Parameters

  • Dur
    A duration object.

  • Mult
    An integral value.

Return Value

Each function returns a duration object whose interval length is Mult multiplied by the length of Dur.

Unless is_convertible<Rep2, common_type<Rep1, Rep2>>holds true, the first function does not participate in overload resolution. For more information, sssee <type_traits>.

Unless is_convertible<Rep1, common_type<Rep1, Rep2>>holds true, the second function does not participate in overload resolution. For more information, see <type_traits>.

Requirements

Header: chrono

Namespace: std::chrono

See Also

Reference

<chrono>

Other Resources

Header Files