On Tuesday, 19 February 2019 at 16:26:33 UTC, drug wrote:

Well, I understand that using floating point values to represent time internally is a bad idea and I totally agree. But some convenient API to convert Duration to floating point and vice versa would be useful because in mechanics for example you often need to express time in seconds with fractional part. In this regard std::chrono is more expressive (the only one though, in general std.datetime is much more powerful than std::chrono).

If you need a real (double, float) parameter, just use it. Transport the units separately...

Reply via email to