'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 6 August 2003 at 6:48:12 pm'!
StringMorph subclass: #GCDisplay
instanceVariableNames: 'prevGC '
classVariableNames: ''
poolDictionaries: ''
category: 'Hungry-FN'!
!GCDisplay commentStamp: 'fn 8/6/2003 18:48' prior: 0!
Display number of full garbage collections since vm startup.
Do "GCDisplay new openInWorld"
Inspiration: ClockMorph.
author: Faried Nawaz <st@pain.hungry.com>
!
!GCDisplay methodsFor: 'initialization' stamp: 'fn 8/6/2003 15:22'!
initialize
super initialize.
self reset.
self step! !
!GCDisplay methodsFor: 'initialization' stamp: 'fn 8/6/2003 15:22'!
reset
prevGC _ -1.
^ self.! !
!GCDisplay methodsFor: 'step' stamp: 'fn 8/6/2003 15:48'!
step
| currGC |
currGC _ Smalltalk vmParameterAt: 7.
currGC = prevGC
ifFalse: [prevGC _ currGC.
super step.
self contents: 'At ' , (Time now asString) , ' full GCs: ' , currGC asString]! !