aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/benchmark.h
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/benchmark.h')
-rw-r--r--erts/emulator/beam/benchmark.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/benchmark.h b/erts/emulator/beam/benchmark.h
index 904564a96b..7fc3933f3d 100644
--- a/erts/emulator/beam/benchmark.h
+++ b/erts/emulator/beam/benchmark.h
@@ -141,10 +141,10 @@ extern unsigned long long major_gc;
/* (Assuming Solaris) */
-#define BM_TIMER_T hrtime_t
-#define BM_START_TIMER(t) system_clock = sys_gethrtime()
+#define BM_TIMER_T ErtsMonotonicTime
+#define BM_START_TIMER(t) system_clock = ERTS_MONOTONIC_TO_NSEC(erts_os_monotonic_time())
#define BM_STOP_TIMER(t) do { \
- BM_TIMER_T tmp = (sys_gethrtime() - system_clock) - timer_time; \
+ BM_TIMER_T tmp = (ERTS_MONOTONIC_TO_NSEC(erts_os_monotonic_time()) - system_clock) - timer_time; \
t##_time += (tmp > 0 ? tmp : 0); \
} while(0)