Skip to content

Commit

Permalink
Fix caml_mach_absolute_time for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Oct 13, 2024
1 parent 7c62a9f commit 711d033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/syntax_benchmarks/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ CAMLprim value caml_mach_absolute_time(value unit) {
#elif defined(__linux__)
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
result = now.tv_sec * 1000 + now.tv_nsec / 1000000;
result = now.tv_sec * 1000000000 + now.tv_nsec;
#endif

return caml_copy_int64(result);
Expand Down

0 comments on commit 711d033

Please sign in to comment.