Add a macro to convert seconds to nanoseconds and vice-versa

Required infrastructure for zfsonlinux/zfs#4600.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #546
This commit is contained in:
David Quigley 2016-05-05 19:10:46 -04:00 committed by Brian Behlendorf
parent ea2633ad26
commit 5e39e4f0b2

View File

@ -46,6 +46,9 @@
#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
#define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
static const int hz = HZ;
#define TIMESPEC_OVERFLOW(ts) \