1
0
mirror of https://github.com/xzeldon/htop.git synced 2025-04-16 23:15:44 +03:00

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:
Christian Göttsche 2021-08-28 17:57:47 +02:00 committed by BenBE
parent e1f4645bd1
commit 74f99e3693

@ -1433,7 +1433,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
uint64_t recheck = ((uint64_t)rand()) % 2048;
if (passedTimeInMs > 2000 || passedTimeInMs > recheck) {
if (passedTimeInMs > recheck) {
lp->last_mlrs_calctime = pl->realtimeMs;
LinuxProcessList_readMaps(lp, procFd, settings->flags & PROCESS_FLAG_LINUX_LRS_FIX, settings->highlightDeletedExe);
}