https://www.b4x.com/android/forum/threads/resumable-subs-sleep-wait-for.78601/
In Java there is a Future object which provides functionality like Wait For. It has timeout parameter. After timeout exceded Feature raises exception.
I propose to add timeout parameter to wait for and either raise exception or just return control and set special variable to indicate that timeout is exceeded.
That's not true. There is no similar feature in Java.
Timeouts should be implemented in the object that raises the events. Not in the Wait For side.
Timeouts are already implemented wherever they make sense.