From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

thread and asyncronous timer delays

i have used both threads and asyncronous timer which is also one type of thread.

i am using windows 7  ,  my operating system is core i-5 dell 980 , labwindows 9.0

my issue :

when running thread i use delay to get desired time intervals and when using asyncronous timer i insert delay when calling timer which gives me desired time interval for specific task.

my issue is when i minimize and maximise my userinterface sevral times then i notice there is a significant delay in the intervals,

asyncronous timer and threads are no more absolute intervals after operating system interupts , kindly suggest a way to avoid this problem. 

thanks in advance .

ahsan

0 Kudos
Message 1 of 5
(4,246 Views)

I have two comments:

 

- Why do you have to use a delay if you are using timers? With the proper timer interval there should be no need for additional delays

- If you have to / want to use a delay, you should use Sleep () from the Windows SDK instead, particularly in multithreaded applications, see here

0 Kudos
Message 2 of 5
(4,241 Views)

you were completly unable to understand my question and i think you havent  read it properly , well when you start an asyncronous timer then you have to give a delay in its arguments which gives desired interval after which you function will be called by asyncronous timer .

0 Kudos
Message 3 of 5
(4,178 Views)

I am sorry for having misunderstood your question and will not bother you with my stupidity in the future

Message 4 of 5
(4,171 Views)

i am sorry please dont take it personally it was about a certian topic your comments are valuable

0 Kudos
Message 5 of 5
(4,159 Views)