diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-18 14:31:59 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-18 14:32:28 -0400 |
commit | 0708303f4998df6388fc0e220227fee5213121c2 (patch) | |
tree | 72c36637bc3998510aec5d35750286a7dbd88760 | |
parent | f9a366f9a6ba7bab23c4095a43228b7f58feffd3 (diff) | |
download | bcachefs-tools-0708303f4998df6388fc0e220227fee5213121c2.tar.gz |
Switch to CLOCK_MONOTONIC_COARSE
CLOCK_MONOTONIC requires a syscall, and is much more expensive.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | include/linux/jiffies.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 4fd3b68d..d16ea76f 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -71,7 +71,7 @@ static inline u64 sched_clock(void) { struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); + clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); return ((s64) ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec; } |