Waitforevent only seems to return serial related events, and not if the returned happened to other reasons. ((1) timeout, (2) stopevent)
Suggestion: turn into function and encode return condition in return value (e.g. 0=serial activity, 1=stopevent 2=timeout)
Hmm, since wait* functions in Windows don't return the time waited, the priority of this is much less.