Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only the basic sleep supports sleeping forever.
It makes no sense ask sleep-timer to return how much time till forever,
nor is there a need for sleep-till to calculate when the end of time is.
  • Loading branch information
TimToady committed Sep 11, 2013
1 parent 6440475 commit 042527b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions S29-functions.pod
Expand Up @@ -255,9 +255,11 @@ an embedded interpreter, all memory must also be reclaimed.

=item sleep

multi sleep ( Real $for = Inf --> Nil )
multi sleep ( Real $for --> Nil )
multi sleep ( Whatever --> Nil )

Attempt to sleep for up to C<$for> seconds. Implementations are obligated
Attempt to sleep for up to C<$for> seconds, or forever when the argument is C<*>.
Implementations are obligated
to support sub-second resolutions if that is at all possible. You may pass
any of C<Int>, C<Num>, C<Rat>, or C<Duration> types as an argument, since those
all do C<Real>, but regardless of which type you use, they are always scaled to
Expand All @@ -272,8 +274,7 @@ if you really just want to keep rolling over in bed until your alarm
goes off at a particular time, use C<sleep-till> instead, since it
is not subject to relative clock drift.

All of these sleep functions work only on the current thread and also
accept * (Whatever) as an indication to sleep indefinitely.
All of these sleep functions work only on the current thread.

=item sleep-timer

Expand Down

0 comments on commit 042527b

Please sign in to comment.