View source code
Display the source code in core/time.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

core.time.Duration.opOpAssign - multiple declarations

Function Duration.opOpAssign

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

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

The legal types of arithmetic for Duration using this operator are

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

Parameters

NameDescription
rhs The duration to add to or subtract from this Duration.

Function Duration.opOpAssign

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

ref Duration opOpAssign(string op) (
  long value
) nothrow @nogc
if (op == "*" || op == "/");

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

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

Parameters

NameDescription
value The value to multiply/divide this Duration by.

Authors

Jonathan M Davis and Kato Shoichi

License

Boost License 1.0.