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:
parent
ea2633ad26
commit
5e39e4f0b2
|
@ -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) \
|
||||
|
|
Loading…
Reference in New Issue