Skip to content

Commit 99abada

Browse files
authored
Merge pull request #1626 from nlordell/fix/clocks-per-sec
Use `CLOCKS_PER_SEC` instead of `CLOCKS_PER_SECOND`
2 parents f764788 + 0624936 commit 99abada

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,8 @@ int janet_gettime(struct timespec *spec, enum JanetTimeSource source) {
950950
}
951951
if (source == JANET_TIME_CPUTIME) {
952952
clock_t tmp = clock();
953-
spec->tv_sec = tmp / CLOCKS_PER_SECOND;
954-
spec->tv_nsec = ((tmp - (spec->tv_sec * CLOCKS_PER_SECOND)) * 1000000000) / CLOCKS_PER_SECOND;
953+
spec->tv_sec = tmp / CLOCKS_PER_SEC;
954+
spec->tv_nsec = ((tmp - (spec->tv_sec * CLOCKS_PER_SEC)) * 1000000000) / CLOCKS_PER_SEC;
955955
}
956956
return 0;
957957
}

0 commit comments

Comments
 (0)