Subj : since ya'll are asking. To : Jasen Betts From : mark lewis Date : Sun Dec 14 2003 08:53 pm 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. JB> first off check the documentation for "timeslice" I don't JB> find it documented as a standard part of TP it is most likely a custom procedure... i call mine "killtime"... JB> What I'm guessing it does is inform a multitasker that the JB> program is not busy so that the multitasker can dedicate JB> more cpu effort to running other tasks. (AFAIK windows JB> OS/2 and Dessqview all do that in slightly different ways JB> (if you're using a dos compiler) all true... in my previous message, i noted 5 seperate slicers that i use... of those, there are 4 distinctly seperate ones... CH>> I have read that you should time them to be at least 55 ms CH>> apart ( depending on the system ). That if you do like I CH>> did above it will accually make the application use more CH>> of the CPU. JB> I don't see how it could cause more CPU usage than putting JB> some form of delay loop between calls to timeslice. me either... and to do that properly would mean chaining the timer interrupt and counting... that's not that hard to do, though... i have stuff here that i use in some debugging and routine timing stuff that sets the clock timer interrupt to fire off 1000 times a second instead of the default 18.2 times a second... yeah, one has to make sure that they call the original clock vector every 18.2 times a second or the system clock will run ahead quite quickly... CH>> Maybe someone could explain to me all about Time Slices. Or CH>> point me in the direction of a place I can read up on them. JB> OTOH if you want to delay for a long time there may be some JB> sort of sleep procedure avaialable. (but your code suggests JB> to me that you want to "do some stuff" between timeslices so JB> probably you are doing it the best way. yes, to me, it, too, appears that he is wanting to make his stuff more multitasker friendly... )\/(ark * Origin: (1:3634/12) .