The OpenD Programming Language

dur

These allow you to construct a Duration from the given time units with the given length.

You can either use the generic function dur and give it the units as a string or use the named aliases.

The possible values for units are "weeks", "days", "hours", "minutes", "seconds", "msecs" (milliseconds), "usecs", (microseconds), "hnsecs" (hecto-nanoseconds, i.e. 100 ns), and "nsecs".

@safe pure nothrow @nogc
dur
(
string units
)
(
long length
)
if (
units == "weeks" ||
units == "days"
||
units == "hours"
||
units == "minutes"
||
units == "seconds"
||
units == "msecs"
||
units == "usecs"
||
units == "hnsecs"
||
units == "nsecs"
)

Parameters

units

The time units of the Duration (e.g. "days").

length long

The number of units in the Duration.

Meta