dur

A variant of core.time.dur which accepts floating-point values. Useful for parsing command-line arguments. Beware of rounding / floating-point errors! Do not use where precision matters.

template dur(string units)
@safe pure nothrow @nogc
Duration
dur
(
T
)
()
if (
is(T : real) &&
!is(T : ulong)
)
if (
units == "weeks" ||
units == "days"
||
units == "hours"
||
units == "minutes"
||
units == "seconds"
||
units == "msecs"
||
units == "usecs"
||
units == "hnsecs"
||
units == "nsecs"
)

Members

Functions

dur
Duration dur(T length)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta