Delays

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Delays.....

Post 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).
Post Reply