'Get triggers from StimServer.
Parameters
timeout : float
maximum time to wait for a valid trigger from the server
verbose : bool, str, int, or None
If not None, override default verbose level (see
:func:`mne.verbose` and :ref:`Logging documentation <tut_logging>`
for more).
See Also
StimServer.add_trigger'

@verbose
def get_trigger(self, timeout=5.0, verbose=None):

    start_time = time.time()
    while True:
        try:
            current_time = time.time()
            if (current_time > (start_time + timeout)):
                logger.info('received    nothing')
                return None
            self._sock.send('get    trigger'.encode('utf-8'))
            trigger = self._sock.recv(1024)
            if (trigger != 'Empty'):
                logger.info(('received    trigger    %s' % str(trigger)))
                return int(trigger)
        except RuntimeError as err:
            logger.info(('Cannot    receive    triggers:    %s' % err))
