Programmable Interval Timer: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m + link to Time And Date |
|||
Line 494: | Line 494: | ||
===Using the IRQ for Preemptive Multitasking=== |
===Using the IRQ for Preemptive Multitasking=== |
||
The timer IRQ can also be used to perform preemptive multitasking. To give the currently running task some time to run, set a threshold, for example of 3 ticks. Use a global variable like the one before but go up from 0, and when that variable hits 3, switch tasks. How you do so is up to you. |
The timer IRQ can also be used to perform preemptive multitasking. To give the currently running task some time to run, set a threshold, for example of 3 ticks. Use a global variable like the one before but go up from 0, and when that variable hits 3, switch tasks. How you do so is up to you. |
||
== See Also == |
|||
=== Articles === |
|||
* [[Time And Date]] |
|||
[[Category:Common Devices]] |
[[Category:Common Devices]] |