summaryrefslogtreecommitdiff
path: root/source/core/unix
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/unix')
-rw-r--r--source/core/unix/slang-unix-process-util.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/core/unix/slang-unix-process-util.cpp b/source/core/unix/slang-unix-process-util.cpp
index 400f4f773..ab4366b06 100644
--- a/source/core/unix/slang-unix-process-util.cpp
+++ b/source/core/unix/slang-unix-process-util.cpp
@@ -15,6 +15,8 @@
#include <sys/wait.h>
#include <unistd.h>
+#include <time.h>
+
namespace Slang {
@@ -247,4 +249,17 @@ namespace Slang {
return SLANG_FAIL;
}
+
+/* static */uint64_t ProcessUtil::getClockFrequency()
+{
+ return 1000000000;
+}
+
+/* static */uint64_t ProcessUtil::getClockTick()
+{
+ struct timespec now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ return now.tv_sec + now.tv_nsec;
+}
+
} // namespace Slang