absl::Duration::operator*=

Multiplies this duration by an integral factor, forwarding to the int64_t overload.

Synopsis

Declared in <absl/time/time.h>

template<
    typename T,
    /* implementation-defined */ = 0>
Duration&
operator*=(T r);

Description

Overloads that forward to either the int64_t or double overloads above. Integer operands must be representable as int64_t. Integer division is truncating, so values less than the resolution will be returned as zero. Floating-point multiplication and division is rounding (halfway cases rounding away from zero), so values less than the resolution may be returned as either the resolution or zero. In particular, d / 2.0 can produce d when it is the resolution and "even".

Return Value

A reference to this duration.

Parameters

NameDescription
rThe factor to multiply by.