'mt.wait(timeout=-1)
Wait for 0MQ to be done with the message or until `timeout`.
Parameters
timeout : float [default: -1, wait forever]
Maximum time in (s) to wait before raising NotDone.
Returns
None
if done before `timeout`
Raises
NotDone
if `timeout` reached before I am done.'

def wait(self, timeout=(-1)):

    tic = time.time()
    if ((timeout is False) or (timeout < 0)):
        remaining = ((3600 * 24) * 7)
    else:
        remaining = timeout
    done = False
    for evt in self.events:
        if (remaining < 0):
            raise NotDone
        evt.wait(timeout=remaining)
        if (not evt.is_set()):
            raise NotDone
        toc = time.time()
        remaining -= (toc - tic)
        tic = toc
    for peer in self.peers:
        if (remaining < 0):
            raise NotDone
        peer.wait(timeout=remaining)
        toc = time.time()
        remaining -= (toc - tic)
        tic = toc
