diff options
-rw-r--r-- | systemunit.pas | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/systemunit.pas b/systemunit.pas index 281df6c..de0e699 100644 --- a/systemunit.pas +++ b/systemunit.pas @@ -89,12 +89,8 @@ begin reset(f); while not eof(f) do begin readln(f,s); - if (leftStr(s,4)='Rss:') and (rightStr(s,3)=' kB') then begin - delete(s,1,4); - delete(s,length(s)-2,3); - s:=trim(s); - result:=result+strtoint(s); - end; + if (leftStr(s,4)='Rss:') and (rightStr(s,3)=' kB') then + result:=result+strtoint(trim(copy(s,5,length(s)-4-3))); end; closefile(f); end; |