[Newbies] Re: Wait for an external app
andreas.raab at gmx.de
Mon Nov 8 19:31:28 UTC 2010
On 11/8/2010 8:12 AM, Sean P. DeNigris wrote:
> This will starve lower priority processes, because Processor yield only
> activates same or higher priority processes. A short delay is better.
> Okay, will do. Is there an idiomatic "short delay" (e.g. 50ms) or just make
> something up?
FWIW, if your application is interactive, I would do that test in a step
method rather than a background process. I.e.,
"Start playing and establish the time watcher"
self startStepping: #watchPlayTime at: Time millisecondClockValue
arguments: nil stepTime: 20.
"is it time to stop playing?"
cd position > endTime ifTrue:[self stopPlaying].
"Stop playing. Also stop the watcher."
self stopStepping: #watchPlayTime.
More information about the Beginners