From f3291244377219534339cffaaa5bfa56cc396d1a Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 13 Dec 2007 06:18:06 +0000 Subject: [PATCH] Add macro to convert nanoseconds to milliseconds --- include/sigar_private.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sigar_private.h b/include/sigar_private.h index e50b79a9..dd2b0c36 100644 --- a/include/sigar_private.h +++ b/include/sigar_private.h @@ -128,6 +128,10 @@ #define SIGAR_TICK2NSEC(s) \ ((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_NSEC / (double)sigar->ticks)) +/* nanoseconds to milliseconds */ +#define SIGAR_NSEC2MSEC(s) \ + ((sigar_uint64_t)(s) / ((sigar_uint64_t)1000000L)) + #define IFTYPE_LO 2 #define IFTYPE_ETH 3