Duration.opBinary

Duration opBinary(string op)(const Duration rhs) if (op == "+" || op == "-" || op == "%") const nothrow @nogc

Adds, subtracts or calculates the modulo of two durations.

The legal types of arithmetic for Duration using this operator are

Duration + Duration --> Duration
Duration - Duration --> Duration
Duration % Duration --> Duration

Parameters

rhsThe duration to add to or subtract from this Duration.
Duration opBinary(string op)(const TickDuration rhs) if (op == "+" || op == "-") const nothrow @nogc
deprecated
No documentation available for this declaration.
Duration opBinary(string op)(long value) if (op == "*" || op == "/") const nothrow @nogc

Multiplies or divides the duration by an integer value.

The legal types of arithmetic for Duration using this operator overload are

Duration * long --> Duration
Duration / long --> Duration

Parameters

valueThe value to multiply this Duration by.
long opBinary(string op)(Duration rhs) if (op == "/") const nothrow @nogc

Divides two durations.

The legal types of arithmetic for Duration using this operator are

Duration / Duration --> long

Parameters

rhsThe duration to divide this Duration by.