Duration.opBinaryRight

Adds or subtracts two durations.

The legal types of arithmetic for Duration using this operator are

TickDuration+Duration-->Duration
TickDuration-Duration-->Duration
  1. Duration opBinaryRight(D lhs)
    struct Duration
    @safe pure
    opBinaryRight
    const nothrow @nogc
    (
    string op
    D
    )
    (
    D lhs
    )
    if (
    (
    op == "+" ||
    op == "-"
    )
    &&
    is(_Unqual!D == TickDuration)
    )
  2. Duration opBinaryRight(long value)

Parameters

lhs
Type: D

The TickDuration to add to this Duration or to subtract this Duration from.

Suggestion Box / Bug Report