mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Use upper case numeric literals
See https://rules.sonarsource.com/c/RSPEC-818
This commit is contained in:
@ -1371,8 +1371,8 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
|
||||
}
|
||||
|
||||
/* period might be 0 after system sleep */
|
||||
float percent_cpu = (period < 1e-6) ? 0.0f : ((lp->utime + lp->stime - lasttimes) / period * 100.0);
|
||||
proc->percent_cpu = CLAMP(percent_cpu, 0.0f, cpus * 100.0f);
|
||||
float percent_cpu = (period < 1e-6) ? 0.0F : ((lp->utime + lp->stime - lasttimes) / period * 100.0);
|
||||
proc->percent_cpu = CLAMP(percent_cpu, 0.0F, cpus * 100.0F);
|
||||
proc->percent_mem = proc->m_resident / (double)(pl->totalMem) * 100.0;
|
||||
|
||||
if (!preExisting) {
|
||||
|
Reference in New Issue
Block a user