code: def _recv_internal(self, timeout):
          
          if timeout is None:
              timeout = NC_DURATION_INFINITE
          else:
              timeout = int(timeout * 1000)
  
          state = ctypes.c_ulong()
          try:
              nican.ncWaitForState(
                  self.handle, NC_ST_READ_AVAIL, timeout, ctypes.byref(state))
          except NicanError as e:
              if e.error_code == TIMEOUT_ERROR_CODE:
                  return None, True
              else:
                  raise
  
          raw_msg = RxMessageStruct()
          nican.ncRead(self.handle, ctypes.sizeof(raw_msg), ctypes.byref(raw_msg))
          # http://stackoverflow.com/questions/6161776/convert-windows-filetime-to-second-in-unix-linux
          timestamp = raw_msg.timestamp / 10000000.0 - 11644473600
          is_remote_frame = raw_msg.frame_type == NC_FRMTYPE_REMOTE
          is_error_frame = raw_msg.frame_type == NC_FRMTYPE_COMM_ERR
          is_extended = bool(raw_msg.arb_id & NC_FL_CAN_ARBID_XTD)
          arb_id = raw_msg.arb_id
          if not is_error_frame:
              arb_id &= 0x1FFFFFFF
          dlc = raw_msg.dlc
          msg = Message(timestamp=timestamp,
                        channel=self.channel,
                        is_remote_frame=is_remote_frame,
                        is_error_frame=is_error_frame,
                        is_extended_id=is_extended,
                        arbitration_id=arb_id,
                        dlc=dlc,
                        data=raw_msg.data[:dlc])
          return msg, True
docs: Read a message from a NI-CAN bus.
  
          :param float timeout:
              Max time to wait in seconds or None if infinite
  
          :raises can.interfaces.nican.NicanError:
              If reception fails