summaryrefslogtreecommitdiffstats
path: root/Python/thread.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-02-21 10:46:00 (GMT)
committerGitHub <noreply@github.com>2024-02-21 10:46:00 (GMT)
commite4c34f04a197391576a692d77eaece1ea10abd87 (patch)
tree058b885d1c1bb090b4db8ea7763c28e4dcfd8df5 /Python/thread.c
parent69ab93082d14425aaac48b8393711c716575b132 (diff)
downloadcpython-e4c34f04a197391576a692d77eaece1ea10abd87.zip
cpython-e4c34f04a197391576a692d77eaece1ea10abd87.tar.gz
cpython-e4c34f04a197391576a692d77eaece1ea10abd87.tar.bz2
gh-110850: Cleanup PyTime API: PyTime_t are nanoseconds (#115753)
PyTime_t no longer uses an arbitrary unit, it's always a number of nanoseconds (64-bit signed integer). * Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong(). * Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong(). * Remove pytime_from_nanoseconds(). * Remove pytime_as_nanoseconds(). * Remove _PyTime_FromNanoseconds().
Diffstat (limited to 'Python/thread.c')
-rw-r--r--Python/thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/thread.c b/Python/thread.c
index cafcaa0..b31d1dc 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -20,8 +20,8 @@
// Define PY_TIMEOUT_MAX constant.
#ifdef _POSIX_THREADS
- // PyThread_acquire_lock_timed() uses _PyTime_FromNanoseconds(us * 1000),
- // convert microseconds to nanoseconds.
+ // PyThread_acquire_lock_timed() uses (us * 1000) to convert microseconds
+ // to nanoseconds.
# define PY_TIMEOUT_MAX_VALUE (LLONG_MAX / 1000)
#elif defined (NT_THREADS)
// WaitForSingleObject() accepts timeout in milliseconds in the range