1414/**
1515 * wait/sleep for $time seconds
1616 *
17+ * The $time value will be used as a timer for the loop so that it keeps running
18+ * until the timeout triggers.
19+ * This implies that if you pass a really small (or negative) value, it will still
20+ * start a timer and will thus trigger at the earliest possible time in the future.
21+ *
1722 * @param float $time
1823 * @param LoopInterface $loop
1924 */
@@ -34,6 +39,8 @@ function sleep($time, LoopInterface $loop)
3439 *
3540 * If a $timeout is given and the promise is still pending once the timeout
3641 * triggers, this will cancel() the promise and throw a `TimeoutException`.
42+ * This implies that if you pass a really small (or negative) value, it will still
43+ * start a timer and will thus trigger at the earliest possible time in the future.
3744 *
3845 * @param PromiseInterface $promise
3946 * @param LoopInterface $loop
@@ -89,6 +96,8 @@ function ($error) use (&$exception, &$wait, $loop) {
8996 *
9097 * If a $timeout is given and either promise is still pending once the timeout
9198 * triggers, this will cancel() all pending promises and throw a `TimeoutException`.
99+ * This implies that if you pass a really small (or negative) value, it will still
100+ * start a timer and will thus trigger at the earliest possible time in the future.
92101 *
93102 * @param array $promises
94103 * @param LoopInterface $loop
@@ -145,6 +154,8 @@ function awaitAny(array $promises, LoopInterface $loop, $timeout = null)
145154 *
146155 * If a $timeout is given and either promise is still pending once the timeout
147156 * triggers, this will cancel() all pending promises and throw a `TimeoutException`.
157+ * This implies that if you pass a really small (or negative) value, it will still
158+ * start a timer and will thus trigger at the earliest possible time in the future.
148159 *
149160 * @param array $promises
150161 * @param LoopInterface $loop
0 commit comments