Add macro to convert nanoseconds to milliseconds

This commit is contained in:
Doug MacEachern 2007-12-13 06:18:06 +00:00
parent 3a299c0ae9
commit f329124437
1 changed files with 4 additions and 0 deletions

View File

@ -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