LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

async timer creation

 

nantek,

 

No, the async timer API does not have an option to use separate threads for each timer. The Windows implementation of the async timer library is built on top of the Windows multimedia timer, which uses a single thread to call all timer callbacks.

 

Keep in mind that the timing accuracy and determinism of Windows is limited and the async timer does not change that. The async timer API was simply intended to provide an asychronous alternative to the UI Library timer which is called by the main CVI user interface thread.

 

ngay528,

 

You certainly could create your own timer by sleeping between iterations of a loop. Whether this would be worthwhile depends on your needs. Sleep operations also have limited accuracy and have the additional limitation that they cannot be tied to a fixed time schedule at the OS level, but are limited to measuring time relative to the start of each sleep call.

 

-Jeff

NI

 

 

0 Kudos
Message 11 of 11
(850 Views)