Subj : since ya'll are asking. To : Chris Hoppman From : Jasen Betts Date : Sat Dec 13 2003 11:50 am Hi Chris. 11-Dec-03 13:21:44, Chris Hoppman wrote to All CH> Since ya'll are asking for someone to help. Maybe you can help me with a CH> CH> problem I am having with a source code I am modifing. CH> It has timeslices built into it, but the CPU usage is still in the upper CH> limits (89-98%). I sorta remember something I have read and wantted to CH> verify CH> it. That the timeslices shouldn't be gave at anytime. Like say you do CH> this. CH> For A := 0 to 100 do CH> begin CH> {Do some stuff here} CH> TimeSlice; CH> end; CH> It would do 100 timeslices back to back. first off check the documentation for "timeslice" I don't find it documented as a standard part of TP What I'm guessing it does is inform a multitasker that the program is not busy so that the multitasker can dedicate more cpu effort to running other tasks. (AFAIK windows OS/2 and Dessqview all do that in slightly different ways (if you're using a dos compiler) CH> I have read that you should time them to be at least 55 ms apart CH> ( depending on the system ). That if you do like I did above it will CH> accually make the application use more of the CPU. I don't see how it could cause more CPU usage than putting some form of delay loop between calls to timeslice. CH> Maybe someone could explain to me all about Time Slices. Or point me in CH> the direction of a place I can read up on them. OTOH if you want to delay for a long time there may be some sort of sleep procedure avaialable. (but your code suggests to me that you want to "do some stuff" between timeslices so probably you are doing it the best way. -=> Bye <=- --- * Origin: Entropy isn't what it used to be. (3:640/1042) .