checkin from browser
authorClaus Gittinger <cg@exept.de>
Thu, 24 Sep 1998 12:46:39 +0200
changeset 1898 770d056a1f44
parent 1897 76292e485360
child 1899 ab2632530ef9
checkin from browser
MemMonitor.st
MemoryMonitor.st
--- a/MemMonitor.st	Thu Sep 24 12:08:08 1998 +0200
+++ b/MemMonitor.st	Thu Sep 24 12:46:39 1998 +0200
@@ -145,9 +145,14 @@
 displayKilo:aNumber name:nm y:y
     |s|
 
-    s := nm , ((aNumber // 1024) printStringLeftPaddedTo:5) , 'k '.
+    aNumber >= (1024*1024*99) ifTrue:[
+        s := nm , ((aNumber // (1024*1024)) printStringLeftPaddedTo:5) , 'M '.
+    ] ifFalse:[
+        s := nm , ((aNumber // 1024) printStringLeftPaddedTo:5) , 'k '.
+    ].
     self displayOpaqueString:s x:0 y:y.
 
+    "Modified: / 23.9.1998 / 13:19:04 / cg"
 !
 
 redraw
@@ -701,12 +706,7 @@
         Processor addTimedBlock:updateBlock afterSeconds:updateInterval.
     ] ifFalse:[
         myProcess := [
-            |d|
-
-            [true] whileTrue:[
-                (Delay forSeconds:updateInterval) wait.
-                self updateDisplay
-            ]
+            self updateProcess
         ] forkAt:6.
         myProcess name:'monitor [' , 
                        Processor activeProcess id printString ,
@@ -717,7 +717,7 @@
     freeColor := freeColor on:device.
     oldColor := oldColor on:device.
 
-    "Modified: / 27.7.1998 / 19:57:51 / cg"
+    "Modified: / 23.9.1998 / 12:41:10 / cg"
 !
 
 reinitStyle
@@ -960,8 +960,19 @@
     "Modified: 27.6.1997 / 14:22:47 / cg"
 ! !
 
+!MemoryMonitor methodsFor:'private'!
+
+updateProcess
+    [true] whileTrue:[
+        Delay waitForSeconds:updateInterval.
+        self updateDisplay
+    ]
+
+    "Modified: / 23.9.1998 / 12:40:31 / cg"
+! !
+
 !MemoryMonitor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/MemMonitor.st,v 1.58 1998-09-15 17:07:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/MemMonitor.st,v 1.59 1998-09-24 10:46:39 cg Exp $'
 ! !
--- a/MemoryMonitor.st	Thu Sep 24 12:08:08 1998 +0200
+++ b/MemoryMonitor.st	Thu Sep 24 12:46:39 1998 +0200
@@ -145,9 +145,14 @@
 displayKilo:aNumber name:nm y:y
     |s|
 
-    s := nm , ((aNumber // 1024) printStringLeftPaddedTo:5) , 'k '.
+    aNumber >= (1024*1024*99) ifTrue:[
+        s := nm , ((aNumber // (1024*1024)) printStringLeftPaddedTo:5) , 'M '.
+    ] ifFalse:[
+        s := nm , ((aNumber // 1024) printStringLeftPaddedTo:5) , 'k '.
+    ].
     self displayOpaqueString:s x:0 y:y.
 
+    "Modified: / 23.9.1998 / 13:19:04 / cg"
 !
 
 redraw
@@ -701,12 +706,7 @@
         Processor addTimedBlock:updateBlock afterSeconds:updateInterval.
     ] ifFalse:[
         myProcess := [
-            |d|
-
-            [true] whileTrue:[
-                (Delay forSeconds:updateInterval) wait.
-                self updateDisplay
-            ]
+            self updateProcess
         ] forkAt:6.
         myProcess name:'monitor [' , 
                        Processor activeProcess id printString ,
@@ -717,7 +717,7 @@
     freeColor := freeColor on:device.
     oldColor := oldColor on:device.
 
-    "Modified: / 27.7.1998 / 19:57:51 / cg"
+    "Modified: / 23.9.1998 / 12:41:10 / cg"
 !
 
 reinitStyle
@@ -960,8 +960,19 @@
     "Modified: 27.6.1997 / 14:22:47 / cg"
 ! !
 
+!MemoryMonitor methodsFor:'private'!
+
+updateProcess
+    [true] whileTrue:[
+        Delay waitForSeconds:updateInterval.
+        self updateDisplay
+    ]
+
+    "Modified: / 23.9.1998 / 12:40:31 / cg"
+! !
+
 !MemoryMonitor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.58 1998-09-15 17:07:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.59 1998-09-24 10:46:39 cg Exp $'
 ! !