diff options
| author | Victor Stinner <vstinner@python.org> | 2024-02-21 10:46:00 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-21 10:46:00 (GMT) |
| commit | e4c34f04a197391576a692d77eaece1ea10abd87 (patch) | |
| tree | 058b885d1c1bb090b4db8ea7763c28e4dcfd8df5 /Modules/_lsprof.c | |
| parent | 69ab93082d14425aaac48b8393711c716575b132 (diff) | |
| download | cpython-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 'Modules/_lsprof.c')
| -rw-r--r-- | Modules/_lsprof.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index 29a80c7..f1cee7c 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -6,7 +6,7 @@ #include "pycore_call.h" // _PyObject_CallNoArgs() #include "pycore_ceval.h" // _PyEval_SetProfile() #include "pycore_pystate.h" // _PyThreadState_GET() -#include "pycore_time.h" // _PyTime_FromNanosecondsObject() +#include "pycore_time.h" // _PyTime_FromLong() #include "rotatingtree.h" @@ -98,7 +98,7 @@ static PyTime_t CallExternalTimer(ProfilerObject *pObj) if (pObj->externalTimerUnit > 0.0) { /* interpret the result as an integer that will be scaled in profiler_getstats() */ - err = _PyTime_FromNanosecondsObject(&result, o); + err = _PyTime_FromLong(&result, o); } else { /* interpret the result as a double measured in seconds. |
