Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Review comments
  • Loading branch information
pitrou committed Nov 15, 2017
commit e642404840824f408faec8794e2df36a9acf6ba4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add time.thread_time()
Add time.thread_time() and time.thread_time_ns()
2 changes: 1 addition & 1 deletion Modules/timemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
const clockid_t clk_id = CLOCK_THREAD_CPUTIME_ID;
const char *function = "clock_gettime(CLOCK_THREAD_CPUTIME_ID)";

if (clock_gettime(clk_id, &ts) != 0) {
if (clock_gettime(clk_id, &ts)) {
PyErr_SetFromErrno(PyExc_OSError);
return -1;
}
Expand Down