Page 2 of 2

Re:Delays.....

Posted: Wed Jan 08, 2003 6:19 am
by Pype.Clicker
Perica Senjak wrote: Hey,

I Kind of Understand.

If i set the PIT to 100 Ticks a Second (100Hz) Would this give enough time to switch tasks and not make the Clock incorrect? How long does it take for a Scheduler to execute? (Just an Estimate of how long?);

Cya.
This depends much of the magnitude order of your scheduler. If you have O(N?) scheduler that has a lot of threads to sort every 10ms, it will for sure take longer than a O(1) scheduler ...

I suggest you set a frequency of 1KHz and schedule only every 10 ticks rather than 100Hz. The advantage will be that your OS will have a more precise delay feature (you can ask to sleep for time as short as 2ms, while having 100Hz clock will block you around 20ms).