WAIT in a MultiTasking program

basically miscellaneous, if it doesn't fit another sub-forum enter it here, we might even promote it to its own sub-forum
Post Reply
Posts: 363
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

WAIT in a MultiTasking program

Post by olzeke51 » Tue Oct 08, 2019 9:51 pm

Curious if WAIT(x) has any adverse affects on the timing in your MultiTasking.bas program??
my WAIT(x) is less than the assigned TaskTime, currently...
what if it is longer??

Posts: 962
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA

Re: WAIT in a MultiTasking program

Post by basicchip » Wed Oct 09, 2019 4:09 am

I would advise against using WAIT in a multitasking program. It would be better to relinquish your task to the next one. If you were waiting at the end of the task, on the next entry to it, check the TIMER to see if the minimum WAIT time had passed.

WAIT itself is not re-entrant, so that 2 tasks calling WAIT would interfere with each other. The same is true for WAITMICRO

Much better to read the TIMER yourself and do the calculation.

Post Reply