Results 1 to 3 of 3

Thread: Run Timer with Highest Priority

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    16

    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

  2. #2
    Member
    Join Date
    Jul 2003
    Location
    UK
    Posts
    60
    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    16
    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
  •  



Click Here to Expand Forum to Full Width