diff options
author | reinelt <> | 2004-01-16 05:04:53 +0000 |
---|---|---|
committer | reinelt <> | 2004-01-16 05:04:53 +0000 |
commit | 914a4213848bda638bbe14b0fd7b873b8bdeeb32 (patch) | |
tree | e03170b68499b254fdcffe478b2d4786a7c867ce /system.c | |
parent | 4d0255d6a1eddbf57178f7170838c20c6b2f5573 (diff) | |
download | lcd4linux-914a4213848bda638bbe14b0fd7b873b8bdeeb32.tar.gz |
[lcd4linux @ 2004-01-16 05:04:53 by reinelt]
started plugin proc_stat which should parse /proc/stat
which again is a paint in the a**
thinking over implementation methods of delta functions
(CPU load, ...)
Diffstat (limited to 'system.c')
-rw-r--r-- | system.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: system.c,v 1.32 2004/01/09 04:16:06 reinelt Exp $ +/* $Id: system.c,v 1.33 2004/01/16 05:04:53 reinelt Exp $ * * system status retreivement * @@ -22,6 +22,12 @@ * * * $Log: system.c,v $ + * Revision 1.33 2004/01/16 05:04:53 reinelt + * started plugin proc_stat which should parse /proc/stat + * which again is a paint in the a** + * thinking over implementation methods of delta functions + * (CPU load, ...) + * * Revision 1.32 2004/01/09 04:16:06 reinelt * added 'section' argument to cfg_get(), but NULLed it on all calls by now. * @@ -556,7 +562,7 @@ int Busy (double *user, double *nice, double *system, double *idle) d3=smooth("cpu_sys", 500, v3); d4=smooth("cpu_idle", 500, v4); d5=d1+d2+d3+d4; - + if (d5!=0.0) { *user=(d1+d2)/d5; *nice=d2/d5; |