|
-
Dec 19th, 2003, 11:04 AM
#1
Thread Starter
Junior Member
Run Timer with Highest Priority
Is it possible to run a timer in Highest priority?
When i try to update the current Thread in the TimerEvent it starts a new thread, so that doesnt work.
i want to have a timer which watches a destillation so i want it to have the highest priority.
Fred
-
May 23rd, 2004, 12:34 PM
#2
Member
There appear to be two types of timers. There is the Threading.Timer class which only works in consoles and System.Windows.Forms.Timer which works in winforms. The documentation says:-
A Timer is used to raise an event at user-defined intervals. This Windows timer is designed for a single-threaded environment where UI threads are used to perform processing. It requires that the user code have a UI message pump available and always operate from the same thread, or marshal the call onto another thread.
It seems that timers cannot have a highest priority and even if it could, the OS cannot guarantee to honour the event. In other words, if the system is busy then the timer may not fire. This is the same as in previous versions of VB and I'm disappointed that this hasn't been sorted out in .Net. Sorry I can't be more helpful.
Nick
-
May 24th, 2004, 03:22 AM
#3
Thread Starter
Junior Member
Thanks very much, i think you have helped me al lost.
Cu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|