Priority to system timers
-
I have a application communicating to the hardware device via serial port.I have to do a task(some work) at the specified interval of time continously. So i opted to use System.Timers. whenever the time elapses,i will perofrm the task.Apart from this i have someother task running parallely in my application. The timer doesn't elapse at the speciifed time when some other task is going on continously.This is due to the time slice that OS schedules for the thread to execute . But how can i make my task to execute when the timer elpases.Can i set some priority to the timer.Is there any alternate way to do this. Thanks in Advance, Sangeetha
-
I have a application communicating to the hardware device via serial port.I have to do a task(some work) at the specified interval of time continously. So i opted to use System.Timers. whenever the time elapses,i will perofrm the task.Apart from this i have someother task running parallely in my application. The timer doesn't elapse at the speciifed time when some other task is going on continously.This is due to the time slice that OS schedules for the thread to execute . But how can i make my task to execute when the timer elpases.Can i set some priority to the timer.Is there any alternate way to do this. Thanks in Advance, Sangeetha
Timers are a low priority message so can be delayed if other things are occurring, you could use a callback function instead, or a thread which wakes up after a specific amount of time.
Darka [Xanya] "I am not a slave to a god that doesn't exist."