Duration.opBinary

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
  1. Duration opBinary(Duration rhs)
    struct Duration
    @safe pure const nothrow @nogc
    opBinary
    (
    string op
    )
    ()
    if (
    op == "+" ||
    op == "-"
    ||
    op == "%"
    )
  2. Duration opBinary(long value)
  3. long opBinary(Duration rhs)

Parameters

rhs Duration

The duration to add to or subtract from this Duration.

Meta