How to multiply `RelTime`
- Arne_GebertOP 1
I have a
RelTimeduration that I would like to multiply by some value to scale it. So, what I would like to do is:import DA.Time let five = seconds 5 let fiveteen = five * 3Is there an obvious to do so via the standard library that I am missing?
Thanks!
Arne - cocreature 4
Nothing builtin I believe. I think your best option is conversion from/to microseconds:
multiplyRelTime : Int -> RelTime -> RelTime multiplyRelTime n t = convertMicrosecondsToRelTime (n * convertRelTimeToMicroseconds t)