[futurebasic] What time do you have

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2002 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Mon, 29 Apr 2002 13:09:36 -0400

I've been working on a very processor intensive program.
I was told that it takes too long, so I ran it on a huge
file and while it didn't take long on my machine I could
see how it could take long on another.  I'll have to try
this out on my PB5300.

Since the program is processor intensive (a euphemism for
a processor hog -- but with cause) I investigated ways of
giving up processor time without making my program come
to a complete halt.  I only found one way of giving up
processor time which wasn't really great anyway according
to Apple.  I used eventAvail(_everyEvent,0) but Apple
states that suspend/resume event get stuck in limbo when
you do this.  

I did it anyway as experiment.  On my machine processing
what I thought was a huge file the time variance from 
start to finish was 7.1 to 7.3 seconds.  When I added
eventAvail to the processing loop the processing time climbed
to dramatically.  It varied between 61 and 63 seconds.

I haven't used threads before but I have read that some threads
cant complete before others.  My concern with that is information
will be written out of order.  I don't know if that's valid or not
as my knowledge of threads is very sparse.

Does anyone have a suggestion on how I could give up processor
time and not multiply my processing time?


W.