@@ -693,6 +693,26 @@ pymonotonic(_PyTime_t *tp, _Py_clock_info_t *info, int raise) |
|
|
693 |
693 |
info->adjustable = 0; |
694 |
694 |
} |
695 |
695 |
|
|
696 |
+#elif defined(__hpux) |
|
697 |
+hrtime_t time; |
|
698 |
+ |
|
699 |
+time = gethrtime(); |
|
700 |
+if (time == -1) { |
|
701 |
+if (raise) { |
|
702 |
+PyErr_SetFromErrno(PyExc_OSError); |
|
703 |
+ } |
|
704 |
+return -1; |
|
705 |
+ } |
|
706 |
+ |
|
707 |
+*tp = time; |
|
708 |
+ |
|
709 |
+if (info) { |
|
710 |
+info->implementation = "gethrtime()"; |
|
711 |
+info->resolution = 1e-9; |
|
712 |
+info->monotonic = 1; |
|
713 |
+info->adjustable = 0; |
|
714 |
+ } |
|
715 |
+ |
696 |
716 |
#else |
697 |
717 |
struct timespec ts; |
698 |
718 |
#ifdef CLOCK_HIGHRES |