diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c index 8f43b54cd4..20fd0e3e7e 100644 --- a/module/spl/spl-time.c +++ b/module/spl/spl-time.c @@ -40,11 +40,10 @@ extern unsigned long long monotonic_clock(void); void __gethrestime(timestruc_t *ts) { - struct timeval tv; + struct timespec tspec = current_kernel_time(); - do_gettimeofday(&tv); - ts->tv_sec = tv.tv_sec; - ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC; + ts->tv_sec = tspec.tv_sec; + ts->tv_nsec = tspec.tv_nsec; } EXPORT_SYMBOL(__gethrestime);