How to ensure timer ticks

  • Thread starter Richard Coltrane
  • Start date
R

Richard Coltrane

Hi there,

I have a custom progress bar control that is supposed to draw itself via
OnPaint whenever an internal timer ticks. Its for situations in which the
amount of time remaining cant be determined so it "progresses" in a loop.

When theres other more pressing work the internal timer that invalidates the
control and thus forces a repaint of the control doesn't tick....so the
update doesn't happen.

How can i ensure the OS gives my timer a fair slice of the cpu time so that
it can tick and trigger a repaint?

Thanks
Richard
 
B

Bryan Phillips

You can try running the timer on a separate thread with an elevated
thread priority.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top