SE / Smalltalk V: Delay for Smalltalk Express ? 
Author Message
 SE / Smalltalk V: Delay for Smalltalk Express ?

Hi,

writing software for my master's thesis I encountered a problem.
I want a Smalltalk Express (Smalltalk V/16) process to be
asleep for a while (a few milliseconds). I know who to solve this in
Visual Works (Delay for: ...) or in C (sleep), but I don't know how
to make a process waiting without exhausting cpu time in Smalltalk
Express. Is there anyone out there who has implemented something like
a Delay Class ?

Thans for your help,

        Christian

-------------------------------------------------------
Christian Noack,
University of Witten
Departement of technological developemnet
Germany




Sat, 22 May 1999 03:00:00 GMT  
 SE / Smalltalk V: Delay for Smalltalk Express ?


Quote:
>writing software for my master's thesis I encountered a problem.
>I want a Smalltalk Express (Smalltalk V/16) process to be
>asleep for a while (a few milliseconds). I know who to solve this in
>Visual Works (Delay for: ...) or in C (sleep), but I don't know how
>to make a process waiting without exhausting cpu time in Smalltalk
>Express. Is there anyone out there who has implemented something like
>a Delay Class ?

It depends whether the Process you want to delay is the foreground u/i
process or a background (non-u/i process). Delaying a background
process is easy because you can just put it into a wait loop:

        doSomething....
        endTime := Time millisecondClockValue + 1000.
        [ Time millisecondClockValue < endTime ]
                whileTrue: [].
        doSomething1SecondLater....

If you did the some to the u/i process, the system would completely
lock for the duration of the delay, since no o/s messages would be
processed.

Hope this helps. Best regards,

== David Zeleznik ==

Objectshare, a division of ParcPlace-Digitalk   http://www.objectshare.com



Mon, 31 May 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SE: GPF on exit of Smalltalk Express on Windows 98

2. SE: SmallTalk Express under NT: dll don't work

3. SE: Smalltalk Express and database

4. SE:How to copy Smalltalk Express in Germany?

5. SE: Smalltalk Express - Better Downloads

6. Regarding old posting about Smalltalk Express delay

7. HELP ! [SE / Smalltalk V] Delay for Smalltalk Express ?

8. US - FL - S.E.****VISUALWORKS/SMALLTALK/VISUALWORKS/SMALLTALK****CONTRACT

9. Smalltalk/V and Smalltalk Express

10. Smalltalk/V Win 2.0 vs Smalltalk/V Win32

11. Smalltalk/V286 vs Smalltalk-80?

12. Unit Delay vs. Zero Delay

 

 
Powered by phpBB® Forum Software