Skip to content

Commit 9de073a

Browse files
committed
Updated wait() API to have current_time argument
1 parent 4667cd0 commit 9de073a

File tree

1 file changed

+4
-1
lines changed
  • spikesafe_python_lib_docs/Threading/wait

1 file changed

+4
-1
lines changed

spikesafe_python_lib_docs/Threading/wait/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [spikesafe-python API Overview](/spikesafe_python_lib_docs/README.md) | [Threading](/spikesafe_python_lib_docs/Threading/README.md) | wait(wait_time)
22

3-
## wait(wait_time)
3+
## wait(wait_time, current_time=time.perf_counter)
44

55
### Definition
66
Suspends the current thread for a specified amount of time.
@@ -9,6 +9,9 @@ Suspends the current thread for a specified amount of time.
99
wait_time [float](https://docs.python.org/3/library/functions.html#float)
1010
Wait time in seconds to suspend the current thread.
1111

12+
current_time [float](https://docs.python.org/3/library/functions.html#float)
13+
Current time in seconds (time.perf_counter by default).
14+
1215
### Examples
1316
The following example demonstrates the wait function. It setups up a SpikeSafe channel, starts it, waits until the event `100, Channel Ready` is returned from the SpikeSafe event queue, and monitors the event queue and readings once per second for 15 seconds.
1417
```

0 commit comments

Comments
 (0)