Sleeping in Squeak?

Karl Ramberg karl.ramberg at chello.se
Thu Feb 1 18:17:37 UTC 2001



Ned Konz wrote:
> 
> On Thursday 01 February 2001 09:57, Aaron J Reichow wrote:
> 
> > I'm looking for the Smalltalk equivalent of C's sleep(n) function.
> > Something that will simply wait for a number of seconds without the
> > ugliness of an always true #whileTrue: loop.
> 
> | delay |
> delay _ Delay forSeconds: 5.
> [ delay wait. self doSomething ] repeat.
> 
> --
> Ned Konz
> currently: Stanwood, WA
> email:     ned at bike-nomad.com
> homepage:  http://bike-nomad.com

In morphic you also have the step and stepTime possibility
step
	self doSomething

stepTime
 ^ 5 minutes asMillisecs

Karl





More information about the Squeak-dev mailing list