Duration.opOpAssign

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

Adds, subtracts or calculates the modulo of two durations as well as assigning the result to this Duration.

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 opOpAssign(string op)(const TickDuration rhs) if (op == "+" || op == "-") ref nothrow @nogc
deprecated
No documentation available for this declaration.
Duration opOpAssign(string op)(long value) if (op == "*" || op == "/") ref nothrow @nogc

Multiplies/Divides the duration by an integer value as well as assigning the result to this Duration.

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

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

Parameters

valueThe value to multiply/divide this Duration by.