def _action_WAITFORRESP(self):

        # log
        log.debug('_action_WAITFORRESP()')

        startTime   = time.time()
        while True:
            waitTimeLeft = startTime+time.time()-self.respTimeout
            if self.rxMsgEvent.wait(timeout=waitTimeLeft):
                # I got message
                with self.dataLock:
                    (timestamp,srcIp,srcPort,message) = self.LastRxPacket
                if isinstance(message,e.coapRc):
                    with self.dataLock:
                        self.coapError = message
                    return
                elif (
                        (
                            message['type']==d.TYPE_CON or
                            message['type']==d.TYPE_NON
                        ) and
                        message['token']==self.token
                    ):

                    # store response
                    with self.dataLock:
                        self.receivedResp = (timestamp,srcIp,srcPort,message)

                    # update FSM state
                    self._setState(self.STATE_RESPRX)

                    # kick FSM
                    self._kickFsm()
                    return
            else:
                # this is an error case
                self.coapError   = e.coapTimeout('No Response received after {0}s'.format(
                        self.respTimeout,
                    )
                )
                return
dataset/ETHPy150Open openwsn-berkeley/coap/coap/coapTransmitter.py/coapTransmitter._action_WAITFORRESP/swapped operands of `-`