Re: Need to run function every 20ms.
- From: "Silver" <moc.liamtoh@gnirrevliseht>
- Date: Thu, 3 Jan 2008 10:06:42 -0800
Quanta be damned! CE is preemptive - a thread of higher priority will be scheduled if it need CPU at thenext tick or at an event which changes the run state. Just be careful using high priority threads - that is do not monopolize the CPU beyond what you need.
That said, you can generate a system tick every 1mS. You could modify the ISR to be clever enough to return a sysintr every 20th click.
Is there a match register associated with the system tick you could use?
See if the multimedia timer is good enough for your needs, and remember to elevate the priority of the thread so it will be sceduled.
If you need more accuracy and determinism then something can be figured out.
Geoff
--
.
- Follow-Ups:
- Re: Need to run function every 20ms.
- From: Allan Lunk
- Re: Need to run function every 20ms.
- References:
- Re: Need to run function every 20ms.
- From: Graeme Wintle
- Re: Need to run function every 20ms.
- Prev by Date: Re: Need to run function every 20ms.
- Next by Date: MFC requires WINVER to be #defined to 0x0400 or greater
- Previous by thread: Re: Need to run function every 20ms.
- Next by thread: Re: Need to run function every 20ms.
- Index(es):
Relevant Pages
|