summaryrefslogtreecommitdiff
path: root/Utilities/cmlibuv/src/unix/posix-hrtime.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:18 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:18 +0900
commitd40909a98298a97d879ceeb3b29dcdc858e85628 (patch)
tree0a9255654a9376c5e9f29aa53d15f0ae173751a0 /Utilities/cmlibuv/src/unix/posix-hrtime.c
parentc5223aaf98b2d10aee32aa614519ee7a23698998 (diff)
downloadcmake-d40909a98298a97d879ceeb3b29dcdc858e85628.tar.gz
cmake-d40909a98298a97d879ceeb3b29dcdc858e85628.tar.bz2
cmake-d40909a98298a97d879ceeb3b29dcdc858e85628.zip
Imported Upstream version 3.16.0upstream/3.16.0
Diffstat (limited to 'Utilities/cmlibuv/src/unix/posix-hrtime.c')
-rw-r--r--Utilities/cmlibuv/src/unix/posix-hrtime.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/src/unix/posix-hrtime.c b/Utilities/cmlibuv/src/unix/posix-hrtime.c
index a2642500e..870b45c76 100644
--- a/Utilities/cmlibuv/src/unix/posix-hrtime.c
+++ b/Utilities/cmlibuv/src/unix/posix-hrtime.c
@@ -43,6 +43,20 @@ uint64_t uv__hrtime(uv_clocktype_t type) {
return mach_absolute_time() * info.numer / info.denom;
}
+#elif defined(__hpux)
+/* Special case for CMake bootstrap: no CLOCK_MONOTONIC on HP-UX */
+
+#ifndef CMAKE_BOOTSTRAP
+#error "This code path meant only for use during CMake bootstrap."
+#endif
+
+#include <stdint.h>
+#include <time.h>
+
+uint64_t uv__hrtime(uv_clocktype_t type) {
+ return (uint64_t) gethrtime();
+}
+
#else
#include <stdint.h>