ae.utils.time.fpdur

Duration functions.

Members

Aliases

days
alias days = dur!"days"
Undocumented in source.
hnsecs
alias hnsecs = dur!"hnsecs"
Undocumented in source.
hours
alias hours = dur!"hours"
Undocumented in source.
minutes
alias minutes = dur!"minutes"
Undocumented in source.
msecs
alias msecs = dur!"msecs"
Undocumented in source.
nsecs
alias nsecs = dur!"nsecs"
Undocumented in source.
seconds
alias seconds = dur!"seconds"
Undocumented in source.
usecs
alias usecs = dur!"usecs"
Undocumented in source.
weeks
alias weeks = dur!"weeks"
Undocumented in source.

Functions

durScale
Duration durScale(Duration d, F f)

Multiply a duration by a floating-point number.

fracTotal
T fracTotal(Duration d)

Like d.total!units, but returns fractional parts as well.

Templates

dur
template dur(string units)

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.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>