aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl
diff options
context:
space:
mode:
authorAdam Leventhal <[email protected]>2013-08-28 16:05:48 -0700
committerBrian Behlendorf <[email protected]>2013-11-04 10:55:25 -0800
commit63fd3c6cfd264cab94dc186fe8cceecac8bc0d50 (patch)
tree2b4c580be7c82a4c5160ef99c0020c4752ba9eff /lib/libspl
parentc1fabe7961b100a7dfd77cddba1650d9a6580dc0 (diff)
Illumos #3582, #3584
3582 zfs_delay() should support a variable resolution 3584 DTrace sdt probes for ZFS txg states Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Christopher Siden <[email protected]> Reviewed by: Dan McDonald <[email protected]> Reviewed by: Richard Elling <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: https://www.illumos.org/issues/3582 illumos/illumos-gate@0689f76 Ported by: Ned Bass <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #1775
Diffstat (limited to 'lib/libspl')
-rw-r--r--lib/libspl/include/sys/time.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h
index 0cbbd928d..852b2eff9 100644
--- a/lib/libspl/include/sys/time.h
+++ b/lib/libspl/include/sys/time.h
@@ -50,6 +50,14 @@
#define NSEC_PER_USEC 1000L
#endif
+#ifndef MSEC2NSEC
+#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
+#endif
+
+#ifndef NSEC2MSEC
+#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
+#endif
+
extern hrtime_t gethrtime(void);
extern void gethrestime(timestruc_t *);