LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

flush pending timer callbacks

Is there some way to flush any pending timer callbacks?  CVI will schedule one overdue callback, but is there some way to prevent this?  Does ResetTimer() flush any pending callbacks?

 

Thanks for any help with this.

 

Menchar

0 Kudos
Message 1 of 3
(3,061 Views)

There can only ever be a single overdue CVI Timer callback, no matter how much of a delay there is in the system being able to service timer ticks. (I often use this feature with a timer interval of 0 to get 100% CPU activity devoted to an intensive processing activity, while maintaining responsiveness to user input via the GUI.)

 

You could always use a global flag at the beginning of your Timer callback function, to simply return immediately in the case that you wanted to flush or otherwise ignore a callback event.

 

JR

0 Kudos
Message 2 of 3
(3,050 Views)

Thanks jr.

 

It's that one overdue callback that I want to be able to kill off.  

 

In the past, I've dynamically de-installed the timer callback, then re-installed it, that seemed to work, but I could never prove it.

 

Menchar

 

 

0 Kudos
Message 3 of 3
(3,027 Views)