How to multiply `RelTime`

I have a RelTime duration 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 * 3

Is there an obvious to do so via the standard library that I am missing?


1 Like

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)