This allows converting a floating point representation of millis/secs into durations, just like std::time::Duration has.