[Issue 6725] core.time.dur should accept floating point

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 21 15:09:26 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=6725

--- Comment #21 from Vladimir Panteleev <thecybershadow at gmail.com> ---
> But honestly, is it really all that hard to just write a wrapper function?

The argument "can't you just put it in your code?" can be applied to many
things in the standard library. I have needed the functionality several times
in different programs, so considering that it is not trivial to do correctly, I
think it should be in the standard library. Also, there is more than just `dur`
- I think it should also be supported by the short-hand functions (`seconds`
etc.), as well as `convert` and `Duration.total` (or some other way to get back
a FP value from a Duration).

--


More information about the Digitalmars-d-bugs mailing list