Waits the specified number of seconds for an event. If the RSPD is down or is in the process of shutting down, the function returns immediately and sets the error code. Otherwise, this function returns with no event (0) and lets your module do an update.
This functions returns 0 if no event happened and the program may continue. If the RSPD has shutdown or if there is another error, -1 is returned. In this case your module should clean up its memory and exit as soon as possible.