mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Replace current_kernel_time() with getnstimeofday()
current_kernel_time() is used by the SPLAT, but it is not meant for performance measurement. We modify the SPLAT to use getnstimeofday(), which is equivalent to the gethrestime() function on Solaris. Additionally, we update gethrestime() to invoke getnstimeofday(). Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #279
This commit is contained in:
committed by
Brian Behlendorf
parent
e90856f1d2
commit
df2c0f1849
@@ -40,7 +40,9 @@ extern unsigned long long monotonic_clock(void);
|
||||
void
|
||||
__gethrestime(timestruc_t *ts)
|
||||
{
|
||||
struct timespec tspec = current_kernel_time();
|
||||
struct timespec tspec;
|
||||
|
||||
getnstimeofday(&tspec);
|
||||
|
||||
ts->tv_sec = tspec.tv_sec;
|
||||
ts->tv_nsec = tspec.tv_nsec;
|
||||
|
||||
Reference in New Issue
Block a user