TickDuration.opOpAssign

TickDuration opOpAssign(string op)(TickDuration rhs) if (op == "+" || op == "-") ref @safe pure nothrow @nogc

Adds or subtracts two TickDurations as well as assigning the result to this TickDuration.

The legal types of arithmetic for TickDuration using this operator are

TickDuration += TickDuration --> TickDuration
TickDuration -= TickDuration --> TickDuration

Parameters

rhsThe TickDuration to add to or subtract from this TickDuration.
void opOpAssign(string op, T)(T value) if (op == "*" && (__traits(isIntegral, T) || __traits(isFloating, T))) @safe pure nothrow @nogc

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

TickDuration * long --> TickDuration
TickDuration * floating point --> TickDuration

Parameters

valueThe value to divide from this duration.
void opOpAssign(string op, T)(T value) if (op == "/" && (__traits(isIntegral, T) || __traits(isFloating, T))) @safe pure

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

TickDuration / long --> TickDuration
TickDuration / floating point --> TickDuration

Parameters

valueThe value to divide from this TickDuration.

Throws

TimeException if an attempt to divide by 0 is made.