From b219ffaa5b1cba3e01cd978a4827b6fb52d4c12b Mon Sep 17 00:00:00 2001 From: Zac Bentley Date: Mon, 14 Oct 2024 09:33:50 -0400 Subject: [PATCH] Fix curio#370: update docstring of traps._sleep --- curio/traps.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/curio/traps.py b/curio/traps.py index 9c5e1314..75f40118 100644 --- a/curio/traps.py +++ b/curio/traps.py @@ -69,12 +69,13 @@ async def _future_wait(future, event=None): ''' return await _kernel_trap('trap_future_wait', future, event) -async def _sleep(clock): +async def _sleep(seconds): ''' - Sleep until the monotonic clock reaches the specified clock value. + Sleep for the specified floating-point number of seconds. If clock is 0, forces the current task to yield to the next task (if any). + Returns the current value of the monotonic clock. ''' - return await _kernel_trap('trap_sleep', clock) + return await _kernel_trap('trap_sleep', seconds) async def _spawn(coro): '''