08-06-2008 08:55 AM
08-06-2008 09:29 AM
08-07-2008 10:23 AM
"ProcessSystemEvents" it is, and it did solve the problem.
Thanks
08-17-2008 11:29 AM
Hi,
It is far easier to use the built Timer and add the counter funciton as timer callback. It is not very accurate, but if you call it every second it is tolerable, certainly comparable with your Delay().
You ca read each time the system clock, so the accuracy wil l be much better.
An alternative is to use assynchronous timer and the respecive callback function. It is better at keeping the delay intervals when you need rapid updates (tmillisecond to hundreds of miliseconds update interval ranges)
layosh
08-21-2008 10:24 AM
DrorProgrammer, do you really think ProcessSystemEvents did solve the problem ?
so, start your countdown, then start dragging your window all around the screen. is your countdown accurate ? i bet it is not...
to understand the problem, you should read some documentation about events, event queues, and how events are processed by CVI (and the underlying operating system).
asynchronous timers will be far better.
08-22-2008 02:59 AM
Hi,
In my opinion, having a multi-threaded application would be the best solution.
But it is harder to code! isn't it?
08-22-2008 03:08 AM
it is not harder to code. it only implies you know how threads interact and which functions to call for creating/starting/stopping a thread. in fact, it is quite easy once you know how to do it.
also, note that the asynchronous timer functions of CVI are implemented using a thread, so it will take care of all the gory thread details for you. those functions can be accessed after adding the asynctmr.fp instrument to your project: this instrument is in <CVI install dir>\toolslib\toolbox.