We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29a1a6e commit 79a7410Copy full SHA for 79a7410
1 file changed
Modules/timemodule.c
@@ -1509,19 +1509,15 @@ _PyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Py_clock_info_t *info)
1509
return -1;
1510
}
1511
if (info) {
1512
+ struct timespec res;
1513
info->implementation = function;
1514
info->monotonic = 1;
1515
info->adjustable = 0;
- #if defined(__NetBSD__)
1516
- info->resolution = 1e-9;
1517
- #else
1518
- struct timespec res;
1519
if (clock_getres(clk_id, &res)) {
1520
PyErr_SetFromErrno(PyExc_OSError);
1521
1522
1523
info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
1524
- #endif
1525
1526
1527
if (_PyTime_FromTimespec(tp, &ts) < 0) {
0 commit comments