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

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 79a7410

Browse files
Revert "gh-123974: Fix time.get_clock_info() on NetBSD (#123975)" (GH-124115)
This reverts commit b1d6f8a.
1 parent 29a1a6e commit 79a7410

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
@@ -1509,19 +1509,15 @@ _PyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Py_clock_info_t *info)
15091509
return -1;
15101510
}
15111511
if (info) {
1512+
struct timespec res;
15121513
info->implementation = function;
15131514
info->monotonic = 1;
15141515
info->adjustable = 0;
1515-
#if defined(__NetBSD__)
1516-
info->resolution = 1e-9;
1517-
#else
1518-
struct timespec res;
15191516
if (clock_getres(clk_id, &res)) {
15201517
PyErr_SetFromErrno(PyExc_OSError);
15211518
return -1;
15221519
}
15231520
info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
1524-
#endif
15251521
}
15261522

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

0 commit comments

Comments
 (0)
0