--- a/SystemStatusMonitor.st Tue Dec 14 21:15:14 1999 +0100
+++ b/SystemStatusMonitor.st Tue Dec 14 21:15:32 1999 +0100
@@ -67,9 +67,10 @@
updateView
self updateList.
- self updateStatus
+ self updateStatus:nil
- "Created: 23.1.1997 / 02:27:05 / cg"
+ "Created: / 23.1.1997 / 02:27:05 / cg"
+ "Modified: / 14.12.1999 / 20:47:37 / cg"
! !
!SystemStatusMonitor methodsFor:'events'!
@@ -117,23 +118,24 @@
"/ event mode is no longer used;
"/ this event support may vanish
Processor isPureEventDriven ifTrue:[
- updateBlock := [self updateStatus].
- listUpdateBlock := [self updateList].
+ updateBlock := [self updateStatus:nil].
+ listUpdateBlock := [self updateList].
].
"
ProcessMonitor open
"
- "Modified: / 5.8.1998 / 13:06:04 / cg"
+ "Modified: / 14.12.1999 / 20:47:57 / cg"
!
mapped
super mapped.
- self updateStatus.
+ self updateStatus:nil.
self updateList.
- "Created: 23.1.1997 / 02:30:05 / cg"
+ "Created: / 23.1.1997 / 02:30:05 / cg"
+ "Modified: / 14.12.1999 / 20:47:54 / cg"
!
realize
@@ -155,23 +157,23 @@
startUpdateProcess
updateBlock notNil ifTrue:[
- Processor addTimedBlock:updateBlock afterSeconds:updateDelay.
- Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay.
+ Processor addTimedBlock:updateBlock afterSeconds:updateDelay.
+ Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay.
] ifFalse:[
- updateProcess := [
- [
- |id cnt myDelay|
+ updateProcess := [
+ [
+ |id cnt myDelay|
- myDelay := Delay forSeconds:0.5.
+ myDelay := Delay forSeconds:0.5.
- "
- every 20ms, we look which process runs;
- every half second, the status is updated.
- every 5 seconds, the list of processes is
- built up again
- "
- [true] whileTrue:[
- 1 to:9 do:[:i |
+ "
+ every 20ms, we look which process runs;
+ every half second, the status is updated.
+ every 5 seconds, 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.
@@ -179,27 +181,27 @@
"/ cnt := cpuUsages at:id ifAbsent:[0].
"/ cpuUsages at:id put:cnt + 1.
"/ ].
- myDelay wait.
- self updateStatus.
- ].
- myDelay wait.
- self updateList.
- ]
- ] valueOnUnwindDo:[
- updateProcess := nil
- ]
- ] forkAt:(Processor userSchedulingPriority + 1).
- updateProcess name:'monitor [' ,
- Processor activeProcess id printString ,
- '] update'.
- "
- raise my own priority
- "
- Processor activeProcess priority:(Processor userSchedulingPriority + 2)
+ myDelay wait.
+ self updateStatus:nil.
+ ].
+ myDelay wait.
+ self updateList.
+ ]
+ ] valueOnUnwindDo:[
+ updateProcess := nil
+ ]
+ ] forkAt:(Processor userSchedulingPriority + 1).
+ updateProcess name:'monitor [' ,
+ Processor activeProcess id printString ,
+ '] update'.
+ "
+ raise my own priority
+ "
+ Processor activeProcess priority:(Processor userSchedulingPriority + 2)
].
- "Created: 23.1.1997 / 02:30:58 / cg"
- "Modified: 24.1.1997 / 21:40:11 / cg"
+ "Created: / 23.1.1997 / 02:30:58 / cg"
+ "Modified: / 14.12.1999 / 20:47:50 / cg"
! !
!SystemStatusMonitor methodsFor:'queries'!
@@ -216,5 +218,5 @@
!SystemStatusMonitor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/SystemStatusMonitor.st,v 1.9 1999-09-23 12:45:18 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/SystemStatusMonitor.st,v 1.10 1999-12-14 20:15:32 cg Exp $'
! !