[Issue 6725] core.time.dur should accept floating point
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 23 02:40:59 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=6725
--- Comment #26 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to Sobirari Muhomori from comment #25)
> That's an overengineered interface and should be done in your code.
> Fractions of timeouts are practically indiscernible, nobody would need to
> specify it that way.
Huh? That's pretty much the standard way to specify timeouts in many utilities
(sleep, timeout, top...). I don't understand your argument - are you saying
that no one should ever need to write a shell script that sleeps for less than
1 second?
(In reply to Sobirari Muhomori from comment #25)
> The examples presented are quite esoteric
IMHO the counter-examples presented here are the esoteric ones. Consider:
- hashing of time values
- a video editor which performs timestamp calculations using FP values
vs.
- allowing the user to specify a fractional number of seconds to sleep for
- tweaking a literal in your code to sleep for 1.5 seconds instead of 1
--
More information about the Digitalmars-d-bugs
mailing list