11-12-2008 07:42 AM
Hi,
What does the time out input of notifiers signifies? What is the best practice to use it, should one give a some amount of timeout (1ms atleast) or shouldn't specify at all (i.e. -1)? I am getting confused as it works fine in both the cases (if i specify time out and didn't specify!)
Thanks!
11-12-2008 07:45 AM
Hi ITA,
if you connect a value greater than -1, then your loop runs in the defined time. If you connect -1. then you only react on received notifications.
Mike
11-12-2008 08:29 PM
Hi Mike,
Still my question remains unanswered.....I want to know what happens to performance?? when it is -1 and other than -1? In which case it takes maximum of CPU? Which should be used?
Thanks!
11-12-2008 09:11 PM
It has nothing to do with CPU performance. It only has to do with the logic of your code.
If it is -1, the code after the notifier only executes once the notifier is received. If the notifier is never received, it holds there for ever.
IF it is a number other than -1, the code after the notifier will execute whenever the notifier is received. If the notifier is not received, the code after it will run once the amount of the time specified in the timeout has passed. You may want to test if the timeout occurred, because you may want to do something different if the notifier timed out as opposed to receiving its notification.
11-12-2008 10:09 PM