Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Priority to system timers

Priority to system timers

Scheduled Pinned Locked Moved Managed C++/CLI
hardwarequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RSangeetha
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • R RSangeetha

      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

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #2

      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."

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups