In Control, is there any way to kick off an asynchronous timer to callback a piece of code after a specified time? I took a look at the TimdeFunc, but it seems cumbersome for what I am looking for. I just want a simple callback to generate a fail to start.
Thanks for your help.
Async Timers
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Async Timers
What about this:
If you have other code in the same script and don't want to block the function including above lines, use it
in a thread explicitely started, e.g.:
Code: Select all
delay(yourTimeout);
theFunction();
in a thread explicitely started, e.g.:
Code: Select all
main()
{
...
startThread("delayedFunc");
...
}
delayedFunc()
{
delay(yourTimeout);
theFunction();
}