HigherOrderCO/Bend

Add friendlier sleep functions

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
The primitive sleep IO function takes a pair of U24 numbers that together form a U48 with the number of nanoseconds to sleep. This is not very friendly and users will usually want to sleep for larger periods and without using a tuple.

Describe the solution you'd like
Sleep seconds, milliseconds and/or microseconds functions that take a single number as argument

Describe alternatives you've considered
Taking a floating point number of seconds as argument. That would require implementing casting operations in Bend (which has to be done anyway) and would result in some imprecision.

I will go with the float sleep option