Subj : Re: since ya'll are asking. To : Chris Hoppman From : Scott Adams Date : Fri Dec 12 2003 07:10 am -=> Quoting Chris Hoppman to All <=- CH> Since ya'll are asking for someone to help. Maybe you can help me CH> with a 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 CH> upper limits (89-98%). I sorta remember something I have read and CH> wantted to verify it. That the timeslices shouldn't be gave at CH> anytime. Like say you do 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. 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. CH> Maybe someone could explain to me all about Time Slices. Or point me CH> in the direction of a place I can read up on them. I actually never sat down to use timeslices except for a few Java programs. The only close to that would be simple program/execution delays. With that said my experience with such is just not as high say as some. The problem is that with today's modern compilers and computers getting faster and faster every day timeslices get less and less value. A timeslice for a old 286 is just nothing for a 5 gigmhz machine. So you have to adapt your timeslices for the actual cpu speed. So if you really really want to get involved you should get code to detect the cpu speed and then modify the timeslice accordingly. Another thing is why do you need the timeslice? A multi-tasking software? A TSR? A game? The particular type of software also indicates how to go. A game sometimes need fast and sometimes slow timeslices, for example. Now with that stuff said have you checked out SWAG? It has at least 3 sample codes using the keyword time slice in it. One for os/2 and Desqview and 2 others general code sources. Keep in mind though those are in pure assembler. But ASM is a good way to go with timeslices. .... Now, what was that magic word? Shazzam? Nah - Garibaldi --- Fringe BBS * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91) .