in Solaris 8 CLOCK_HIGHRES was the (only) name for CLOCK_MONOTONIC
int rep_clock_gettime(clockid_t clk_id, struct timespec *tp);
#endif
/* make sure we have a best effort CUSTOM_CLOCK_MONOTONIC we can rely on */
-#ifndef CLOCK_MONOTONIC
-#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME
-#else
+#if defined(CLOCK_MONOTONIC)
#define CUSTOM_CLOCK_MONOTONIC CLOCK_MONOTONIC
+#elif defined(CLOCK_HIGHRES)
+#define CUSTOM_CLOCK_MONOTONIC CLOCK_HIGHRES
+#else
+#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME
#endif
#endif