mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
[3.12] Revert "gh-123974: Fix time.get_clock_info() on NetBSD (GH-123975)" (GH-124115) (GH-124200)
This reverts commitb1d6f8a2ee
. (cherry picked from commit79a7410236
) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
5827be86fe
commit
708173c35e
1 changed files with 1 additions and 5 deletions
|
@ -1525,19 +1525,15 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
|
|||
return -1;
|
||||
}
|
||||
if (info) {
|
||||
struct timespec res;
|
||||
info->implementation = function;
|
||||
info->monotonic = 1;
|
||||
info->adjustable = 0;
|
||||
#if defined(__NetBSD__)
|
||||
info->resolution = 1e-9;
|
||||
#else
|
||||
struct timespec res;
|
||||
if (clock_getres(clk_id, &res)) {
|
||||
PyErr_SetFromErrno(PyExc_OSError);
|
||||
return -1;
|
||||
}
|
||||
info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (_PyTime_FromTimespec(tp, &ts) < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue