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 708173c

Browse filesBrowse 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
Copy full SHA for 708173c

File tree

Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-5
lines changed

‎Modules/timemodule.c

Copy file name to clipboardExpand all lines: Modules/timemodule.c
+1-5Lines 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-
#endif
15411537
}
15421538

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.