--- a/ProcessMonitor.st Wed Jun 12 14:12:02 1996 +0200
+++ b/ProcessMonitor.st Wed Jun 12 20:28:14 1996 +0200
@@ -418,23 +418,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 := [
- Process terminateSignal handle:[:ex |
- updateProcess := nil
- ] do:[
- |id cnt|
+ updateProcess := [
+ Process terminateSignal handle:[:ex |
+ updateProcess := nil
+ ] do:[
+ |id cnt|
- "
- 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.
@@ -442,22 +442,24 @@
"/ cnt := cpuUsages at:id ifAbsent:[0].
"/ cpuUsages at:id put:cnt + 1.
"/ ].
- (Delay forSeconds:0.5) wait.
- self updateStatus.
- ].
- (Delay forSeconds:0.5) wait.
- self updateList.
- ]
- ]
- ] forkAt:(Processor userSchedulingPriority + 1).
- updateProcess name:'monitor [' ,
- Processor activeProcess id printString ,
- '] update'.
- "
- raise my own priority
- "
- Processor activeProcess priority:(Processor userSchedulingPriority + 2)
+ Delay waitForSeconds:0.5.
+ self updateStatus.
+ ].
+ Delay waitForSeconds:0.5.
+ self updateList.
+ ]
+ ]
+ ] forkAt:(Processor userSchedulingPriority + 1).
+ updateProcess name:'monitor [' ,
+ Processor activeProcess id printString ,
+ '] update'.
+ "
+ raise my own priority
+ "
+ Processor activeProcess priority:(Processor userSchedulingPriority + 2)
].
+
+ "Modified: 12.6.1996 / 19:53:13 / cg"
! !
!ProcessMonitor methodsFor:'menu actions'!
@@ -631,4 +633,4 @@
!ProcessMonitor class methodsFor:'documentation'!
version
-^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.35 1996-04-27 18:00:04 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.36 1996-06-12 18:28:14 cg Exp $'! !