sleep for SELECT_TIMEOUT if no file is pending