Cool. So would you give your blessings to something like this?
- algorithms that need absolute accuracy should only accept actual discrete time periods, in their method signature. So they can’t accept floats or some such.
- algorithms that don’t rely on such high levels of accuracy can accept:
- a
Numberwhere their docs say it should be seconds/minutes/etc… - a
Unitful.jltime unit -
DatesTime/Timeinstance
- a
I think #2 is best in the case where accuracy is not an issue. This way whoever needs the accuracy can enforce it, and whoever wants some flexibility can have it.