8000 [3.12] Revert "gh-123974: Fix time.get_clock_info() on NetBSD (GH-123… · python/cpython@708173c · GitHub
[go: up one dir, main page]

Skip to content

Commit 708173c

Browse files
[3.12] Revert "gh-123974: Fix time.get_clock_info() on NetBSD (GH-123975)" (GH-124115) (GH-124200)
This reverts commit b1d6f8a. (cherry picked from commit 79a7410) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 5827be8 commit 708173c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Modules/timemodule.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,19 +1525,15 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
15251525
return -1;
15261526
}
15271527
if (info) {
1528+
struct timespec res;
15281529
info->implementation = function;
15291530
info->monotonic = 1;
15301531
info->adjustable = 0;
1531-
#if defined(__NetBSD__)
1532-
info->resolution = 1e-9;
1533-
#else
1534-
struct timespec res;
15351532
if (clock_getres(clk_id, &res)) {
15361533
PyErr_SetFromErrno(PyExc_OSError);
15371534
return -1;
15381535
}
15391536
info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
1540 4F8E -
#endif
15411537
}
15421538

15431539
if (_PyTime_FromTimespec(tp, &ts) < 0) {

0 commit comments

Comments
 (0)
0