--- a/SystemStatusMonitor.st Tue Jun 12 11:57:08 2001 +0200
+++ b/SystemStatusMonitor.st Tue Jun 12 11:57:31 2001 +0200
@@ -196,23 +196,16 @@
[
|id cnt myDelay|
- myDelay := Delay forSeconds:0.5.
+ myDelay := Delay forSeconds:updateDelay.
"
- every 20ms, we look which process runs;
+ every updateDelay (0.5), we look which process runs;
every half second, the status is updated.
- every 5 seconds, the list of processes is
+ every listUpdateDelay (5s), the list of processes is
built up again
"
[true] whileTrue:[
- 1 to:9 do:[:i |
-"/ cpuUsages := IdentityDictionary new.
-"/ 1 to:25 do:[:i |
-"/ (Delay forSeconds:0.02) wait.
-"/ id := Processor interruptedProcess id.
-"/ cnt := cpuUsages at:id ifAbsent:[0].
-"/ cpuUsages at:id put:cnt + 1.
-"/ ].
+ ((listUpdateDelay // updateDelay) max:2) - 1 timesRepeat:[
myDelay wait.
self updateStatus:nil.
].
@@ -250,5 +243,5 @@
!SystemStatusMonitor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/SystemStatusMonitor.st,v 1.13 2000-11-15 12:35:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/SystemStatusMonitor.st,v 1.14 2001-06-12 09:57:31 cg Exp $'
! !