Re: Duration to Decimal Total

2019-11-06 Thread Dennis via Digitalmars-d-learn
On Wednesday, 6 November 2019 at 19:13:46 UTC, Jonathan Levi wrote: I would think a function that this would be appropriate to belong in the module. Am I missing it? Or, how would you recommend calculating it? The author of the module has explained before that this is very intentional: htt

Duration to Decimal Total

2019-11-06 Thread Jonathan Levi via Digitalmars-d-learn
`core.time.Duration` has a `total` function for extracting the value withing the Duration. `total` returns a whole number (`long`). Is there a function that returns a decimal (`double` or `float`)? I cannot find one in `core.time`. How would I do it then? I know I can get finer precision (s