]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-110850: Cleanup PyTime API: PyTime_t are nanoseconds (#115753)
authorVictor Stinner <vstinner@python.org>
Wed, 21 Feb 2024 10:46:00 +0000 (11:46 +0100)
committerGitHub <noreply@github.com>
Wed, 21 Feb 2024 10:46:00 +0000 (11:46 +0100)
commite4c34f04a197391576a692d77eaece1ea10abd87
tree058b885d1c1bb090b4db8ea7763c28e4dcfd8df5
parent69ab93082d14425aaac48b8393711c716575b132
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().
Include/internal/pycore_time.h
Modules/_lsprof.c
Modules/_testinternalcapi/pytime.c
Modules/timemodule.c
Python/pytime.c
Python/thread.c
Python/thread_nt.h
Python/thread_pthread.h