We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f764788 + 0624936 commit 99abadaCopy full SHA for 99abada
src/core/util.c
@@ -950,8 +950,8 @@ int janet_gettime(struct timespec *spec, enum JanetTimeSource source) {
950
}
951
if (source == JANET_TIME_CPUTIME) {
952
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;
+ spec->tv_sec = tmp / CLOCKS_PER_SEC;
+ spec->tv_nsec = ((tmp - (spec->tv_sec * CLOCKS_PER_SEC)) * 1000000000) / CLOCKS_PER_SEC;
955
956
return 0;
957
0 commit comments