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