Wait for 0 seconds

Hi Chris,

Would there be anything wrong with having a wait action for 0 seconds in some cases? Would MWorks just not execute the command, or would it still go through the effort of setting up the timer? I can easily add an if statement, just curious about the implementation. If you’re not sure don’t bother digging up the answer.

Thanks,
Evan

Hi Evan,

Would there be anything wrong with having a wait action for 0 seconds in some cases? Would MWorks just not execute the command, or would it still go through the effort of setting up the timer?

With a simple “wait”, the command will execute but will complete immediately, with no actual waiting. With a “start timer” action, you’ll get a warning on the server console saying “Scheduling a timer to fire at a time in the past”, but no timer thread will be created, and a “timer expired” transition on the timer will execute immediately. In either case, the execution of your experiment won’t be affected, as no actual waiting takes place.

Cheers,
Chris

Got it, thanks!