mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
Switch to CLOCK_MONOTONIC_COARSE
CLOCK_MONOTONIC requires a syscall, and is much more expensive. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f9a366f9a6
commit
0708303f49
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user