remove TICK2SEC, add TICK2NSEC

This commit is contained in:
Doug MacEachern 2006-12-04 18:44:28 +00:00
parent 0844a450e3
commit 524844f9a6
1 changed files with 3 additions and 4 deletions

View File

@ -101,15 +101,14 @@
#endif #endif
#define SIGAR_MSEC 1000L #define SIGAR_MSEC 1000L
#define SIGAR_NSEC 1000000000L
#define SIGAR_SEC2NANO(s) \ #define SIGAR_SEC2NANO(s) \
((sigar_uint64_t)(s) * (sigar_uint64_t)1000000000) ((sigar_uint64_t)(s) * (sigar_uint64_t)SIGAR_NSEC)
/* cpu ticks to seconds */
#define SIGAR_TICK2SEC(s) ((s) / sigar->ticks)
/* cpu ticks to milliseconds */ /* cpu ticks to milliseconds */
#define SIGAR_TICK2MSEC(s) ((s) * (SIGAR_MSEC / sigar->ticks)) #define SIGAR_TICK2MSEC(s) ((s) * (SIGAR_MSEC / sigar->ticks))
#define SIGAR_TICK2NSEC(s) ((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_NSEC / sigar->ticks))
#define IFTYPE_LO 2 #define IFTYPE_LO 2
#define IFTYPE_ETH 3 #define IFTYPE_ETH 3