#1 2016-10-03 13:07:20

DigDiver
Member
Registered: 2013-04-29
Posts: 137

TSystemUse CPU Kernel and User value alwais 0

procedure TSystemUse.BackgroundExecute
...
difftot := (fSysPrevKernel-skrn)+(fSysPrevUser-susr); // In my case the difftot < 0 
...
   if difftot>0 then begin                                         //  when I try to use:  if difftot<>0 then begin    CPU usage is correct              
                Kernel := diffkrn*100/difftot;
                User := diffusr*100/difftot;
              end else begin
                Kernel := 0;
                User := 0;
              end;

Offline

#2 2016-10-03 14:20:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,667
Website

Re: TSystemUse CPU Kernel and User value alwais 0

This is a not tested feature...
and indeed a bug!
wink

Offline

Board footer

Powered by FluxBB