Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time Limit
#2
Usually it's better to put a limit-time code in the function.
If not, need to execute the function in other thread, like this:
Macro Macro2738
Code:
Copy      Help
int timeLimit=3 ;;seconds

rep 1
,int ht
,ht=mac("sub.FUNCTION_1")
,wait timeLimit H ht; err EndThread "" ht
,ht=mac("sub.FUNCTION_2")
,wait timeLimit H ht; err EndThread "" ht


#sub FUNCTION_1
mes 1


#sub FUNCTION_2
mes 2


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)