Fix cpu ticks to msec on linux/ia64

Submitted by: Jan Kneschke <jan.kneschke@mysql.com>
This commit is contained in:
Doug MacEachern 2007-03-29 20:40:54 +00:00
parent b1a19f4e72
commit b457837f28
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-03-29 Doug MacEachern <dougm@hyperic.com>
* Fix cpu ticks to msec on linux/ia64
Submitted by: Jan Kneschke <jan.kneschke@mysql.com>
2007-03-24 Doug MacEachern <dougm@hyperic.com> 2007-03-24 Doug MacEachern <dougm@hyperic.com>
* Implement proc_state_t.threads on OS X * Implement proc_state_t.threads on OS X

View File

@ -118,8 +118,11 @@
((sigar_uint64_t)(s) * (sigar_uint64_t)SIGAR_NSEC) ((sigar_uint64_t)(s) * (sigar_uint64_t)SIGAR_NSEC)
/* cpu ticks to milliseconds */ /* cpu ticks to milliseconds */
#define SIGAR_TICK2MSEC(s) ((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_MSEC / sigar->ticks)) #define SIGAR_TICK2MSEC(s) \
#define SIGAR_TICK2NSEC(s) ((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_NSEC / sigar->ticks)) ((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_MSEC / (double)sigar->ticks))
#define SIGAR_TICK2NSEC(s) \
((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_NSEC / (double)sigar->ticks))
#define IFTYPE_LO 2 #define IFTYPE_LO 2
#define IFTYPE_ETH 3 #define IFTYPE_ETH 3