]>
git.proxmox.com Git - mirror_spl.git/blob - modules/spl/spl-time.c
c12c3d9bb2ae42e4e5f8dfa542ffddc67214430e
1 #include <sys/sysmacros.h>
9 #define DEBUG_SUBSYSTEM S_TIME
12 __gethrestime(timestruc_t
*ts
)
14 getnstimeofday((struct timespec
*)ts
);
16 EXPORT_SYMBOL(__gethrestime
);
19 __clock_gettime(clock_type_t type
, timespec_t
*tp
)
21 /* Only support CLOCK_REALTIME+__CLOCK_REALTIME0 for now */
22 ASSERT((type
== CLOCK_REALTIME
) || (type
== __CLOCK_REALTIME0
));
27 EXPORT_SYMBOL(__clock_gettime
);
29 /* This function may not be as fast as using monotonic_clock() but it
30 * should be much more portable, if performance becomes as issue we can
31 * look at using monotonic_clock() for x86_64 and x86 arches.
38 do_posix_clock_monotonic_gettime(&tv
);
39 rc
= (NSEC_PER_SEC
* (hrtime_t
)tv
.tv_sec
) + (hrtime_t
)tv
.tv_nsec
;
43 EXPORT_SYMBOL(__gethrtime
);