remove TICK2SEC, add TICK2NSEC
This commit is contained in:
parent
0844a450e3
commit
524844f9a6
|
@ -101,15 +101,14 @@
|
|||
#endif
|
||||
|
||||
#define SIGAR_MSEC 1000L
|
||||
#define SIGAR_NSEC 1000000000L
|
||||
|
||||
#define SIGAR_SEC2NANO(s) \
|
||||
((sigar_uint64_t)(s) * (sigar_uint64_t)1000000000)
|
||||
|
||||
/* cpu ticks to seconds */
|
||||
#define SIGAR_TICK2SEC(s) ((s) / sigar->ticks)
|
||||
((sigar_uint64_t)(s) * (sigar_uint64_t)SIGAR_NSEC)
|
||||
|
||||
/* cpu ticks to milliseconds */
|
||||
#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_ETH 3
|
||||
|
|
Loading…
Reference in New Issue