mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Refactor saturatingSub() to be part of Macros.h
This commit is contained in:
@ -242,10 +242,6 @@ static void NetBSDProcessList_scanProcs(NetBSDProcessList* this) {
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned long long saturatingSub(unsigned long long a, unsigned long long b) {
|
||||
return a > b ? a - b : 0;
|
||||
}
|
||||
|
||||
static void getKernelCPUTimes(int cpuId, u_int64_t* times) {
|
||||
const int mib[] = { CTL_KERN, KERN_CP_TIME, cpuId };
|
||||
size_t length = sizeof(*times) * CPUSTATES;
|
||||
|
Reference in New Issue
Block a user