mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
A few fixes for the per-process load average calculation
This commit is contained in:
@@ -573,7 +573,7 @@ static ssize_t proc_loadavg(FAR struct proc_file_s *procfile,
|
||||
{
|
||||
uint32_t tmp;
|
||||
|
||||
tmp = 1000 - (1000 * cpuload.active) / cpuload.total;
|
||||
tmp = (1000 * cpuload.active) / cpuload.total;
|
||||
intpart = tmp / 10;
|
||||
fracpart = tmp - 10 * intpart;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user