Skip to content

Commit

Permalink
Merge pull request #391 from karpathy/revert-389-realtime
Browse files Browse the repository at this point in the history
Revert "Minor fix: Use CLOCK_MONOTONIC instead of CLOCK_REALTIME"
  • Loading branch information
karpathy authored Sep 12, 2023
2 parents 0bf2981 + 38c58ac commit 766a30b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ int sample(Sampler* sampler, float* logits) {
long time_in_ms() {
// return time in milliseconds, for benchmarking the model speed
struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time);
clock_gettime(CLOCK_REALTIME, &time);
return time.tv_sec * 1000 + time.tv_nsec / 1000000;
}

Expand Down

0 comments on commit 766a30b

Please sign in to comment.