mirror of https://github.com/xzeldon/htop.git
linux: simplify recheck condition
`recheck` is calculated modulo 2048, so its maximum value is 2047. Drop the quite similar (up to 27 milliseconds) explicit check against 2000.
This commit is contained in:
parent
e1f4645bd1
commit
74f99e3693
|
@ -1433,7 +1433,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
|
||||||
|
|
||||||
uint64_t recheck = ((uint64_t)rand()) % 2048;
|
uint64_t recheck = ((uint64_t)rand()) % 2048;
|
||||||
|
|
||||||
if (passedTimeInMs > 2000 || passedTimeInMs > recheck) {
|
if (passedTimeInMs > recheck) {
|
||||||
lp->last_mlrs_calctime = pl->realtimeMs;
|
lp->last_mlrs_calctime = pl->realtimeMs;
|
||||||
LinuxProcessList_readMaps(lp, procFd, settings->flags & PROCESS_FLAG_LINUX_LRS_FIX, settings->highlightDeletedExe);
|
LinuxProcessList_readMaps(lp, procFd, settings->flags & PROCESS_FLAG_LINUX_LRS_FIX, settings->highlightDeletedExe);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue