https://github.com/python/cpython/commit/708173c35e5a51a6aa7e4d0647cbcbfc9adab1ed
commit: 708173c35e5a51a6aa7e4d0647cbcbfc9adab1ed
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-09-18T06:47:17Z
summary:

[3.12] Revert "gh-123974: Fix time.get_clock_info() on NetBSD (GH-123975)" 
(GH-124115) (GH-124200)

This reverts commit b1d6f8a2ee04215c64aa8752cc515b7e98a08d28.
(cherry picked from commit 79a74102362996bbd4ff5d410a0d57d43c236da4)

Co-authored-by: Serhiy Storchaka <[email protected]>

files:
M Modules/timemodule.c

diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 124efc8364bfd7..8613fccfe02249 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -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) {

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to