I want to make a Range so that I could reason about relative ranges of time. I can’t because DispatchTimeInterval is not Comparable.
My intuition is that it could be, with ‘never’ being treated as ‘distant future’ and greater than any non-never value, but equal to other ‘never’ values.
Is there a reason this was not done?
In the end, it may not matter. Part of my goal had been to be able to do something like:
let range = .milliseconds(200) ..< .seconds(10)
let randomTimeInterval = DispatchTimeInterval.random(in: range)
But DispatchTimeInterval doesn’t support random either...