get the timeout time at some port of some datapath.
546742
def _get_slave_timeout(self, dpid, port):
        """"""
        slave = self._get_slave(dpid, port)
        if slave:
            return slave['timeout']
        else:
            return 0
542747
def timeout(self, duration=3600):
        
        self.room.check_owner()
        self.conn.make_call("timeoutFile", self.fid, duration)
82103
private Integer getPort(String resourcePath, FtpEndpointConfiguration endpointConfiguration) {
        if (resourcePath.contains(":")) {
            return Integer.valueOf(resourcePath.split(":")[1]);
        }

        return endpointConfiguration.getPort();
    }
848630
def readWithTimeout(socket, length, timeout)
      rc = IO.select([socket], nil, nil, timeout)
      if ! rc
        raise "Waiting for response from UDP tracker #{@host}:#{@trackerPort} timed out after #{@timeout} seconds"
      elsif rc[0].size > 0
        socket.recvfrom(length)[0]
      else
        raise "Error receiving response from UDP tracker #{@host}:#{@trackerPort}"
      end
    end
614457
def _GetDelayImportTimestamps(self, pefile_object):
    
    delay_import_timestamps = []
    if not hasattr(pefile_object, 'DIRECTORY_ENTRY_DELAY_IMPORT'):
      return delay_import_timestamps
    for importdata in pefile_object.DIRECTORY_ENTRY_DELAY_IMPORT:
      dll_name = importdata.dll
      try:
        dll_name = dll_name.decode('ascii')
      except UnicodeDecodeError:
        dll_name = dll_name.decode('ascii', errors='replace')

      timestamp = getattr(importdata.struct, 'dwTimeStamp', 0)
      delay_import_timestamps.append([dll_name, timestamp])
    return delay_import_timestamps
687366
def access_time(self):
    """"""
    timestamp = self._fsapfs_file_entry.get_access_time_as_integer()
    return dfdatetime_apfs_time.APFSTime(timestamp=timestamp)
1247745
def get_packet_time(self, pkt):
        """"""
        if pkt.sent_time:
          t = pkt.sent_time
          sec = int(t)
        else:
          t = pkt.time
          sec = int(t)
        usec = int(round((t-sec)*1000000))
        return (sec,usec)
14454
def maybe_timeout_options(self):
    """"""
    if self._exit_timeout_start_time:
      return NailgunProtocol.TimeoutOptions(self._exit_timeout_start_time, self._exit_timeout)
    else:
      return None
1319043
def getmtime(self, filepath):
        """"""
        if self.is_ssh(filepath):
            self._check_ftp()
            source = self._get_remote(filepath)
            mtime = self.ftp.stat(source).st_mtime
        else:
            mtime = os.path.getmtime(filepath)

        return mtime
1260148
def checkTimeout(self, now):
        """"""
        log.debug("checking for timeout on session %s", self)
        if now - self.last_update > self.timeout:
            raise TftpTimeout("Timeout waiting for traffic")
832116
public int getSocketTimeout() {
        int timeoutInt = -1;  // -1 indicates it hasn't been set yet
        String timeoutStr = System.getProperty(SOCKET_TIMEOUT);
        if (timeoutStr != null && timeoutStr.length() > 0) {
            int parsedTimeoutInt = Integer.parseInt(timeoutStr);
            if (parsedTimeoutInt >= 0) {
                timeoutInt = parsedTimeoutInt;
            }
        }
        if (timeoutInt == -1) { // Didn't find a system property
            timeoutStr = getProperty(SOCKET_TIMEOUT);
            if (timeoutStr != null && timeoutStr.length() > 0) {
                int parsedTimeoutInt = Integer.parseInt(timeoutStr);
                if (parsedTimeoutInt >= 0) {
                    timeoutInt = parsedTimeoutInt;
                }
            }
        }
        if (timeoutInt == -1) { // Didn't find any property at all
            timeoutInt = 120 * 1000;
        }
        return timeoutInt;
    }
1012624
def getTimeSinceLastUpdate(IOType):
    """"""
    global last_update_times
    # assert(IOType in ['net', 'disk', 'process_disk'])
    current_time = time()
    last_time = last_update_times.get(IOType)
    if not last_time:
        time_since_update = 1
    else:
        time_since_update = current_time - last_time
    last_update_times[IOType] = current_time
    return time_since_update
1116958
def _readline(self, timeout=1):
        
        line = self.port.readline(timeout=timeout)
        return strip_escape(line.strip()) if line is not None else line
1092417
static String getStrDefaultTimeout()
	{
		//	Check if already done
		if (default_timeout==null)
			if ((default_timeout=System.getProperty("TANGO_TIMEOUT"))==null)	//	From JVM property
				if ((default_timeout=System.getenv("TANGO_TIMEOUT"))==null)		//	From Environment property
					default_timeout = getFromEnvFile("TANGO_TIMEOUT");		//	From Environment file
		//	else
		return default_timeout;
	}
286007
def capture_and_print_timeshot(self, start_time, which,
                                   other=99, switch="x.x.x.x"):
        """"""

        curr_timeout = time.time() - start_time
        if which in self.time_stats:
            self.time_stats[which]["total_time"] += curr_timeout
            self.time_stats[which]["total_count"] += 1
            if (curr_timeout < self.time_stats[which]["min"]):
                self.time_stats[which]["min"] = curr_timeout
            if (curr_timeout > self.time_stats[which]["max"]):
                self.time_stats[which]["max"] = curr_timeout
        else:
            self.time_stats[which] = {
                "total_time": curr_timeout,
                "total_count": 1,
                "min": curr_timeout,
                "max": curr_timeout}
        LOG.debug("NEXUS_TIME_STATS %(switch)s, pid %(pid)d, tid %(tid)d: "
                  "%(which)s_timeout %(curr)f count %(count)d "
                  "average %(ave)f other %(other)d min %(min)f max %(max)f",
                  {'switch': switch,
                  'pid': os.getpid(),
                  'tid': threading.current_thread().ident,
                  'which': which,
                  'curr': curr_timeout,
                  'count': self.time_stats[which]["total_count"],
                  'ave': (self.time_stats[which]["total_time"] /
                          self.time_stats[which]["total_count"]),
                  'other': other,
                  'min': self.time_stats[which]["min"],
                  'max': self.time_stats[which]["max"]})
909835
def get_duration(self):
        """"""

        doc = self._request(self.ws_prefix + ".getInfo", True)

        return _number(_extract(doc, "duration"))
1050352
def grab_earliest(self, timeout: float=None) -> typing.List[DataAndMetadata.DataAndMetadata]:
        """"""
        timeout = timeout if timeout is not None else 10.0
        with self.__buffer_lock:
            if len(self.__buffer) == 0:
                done_event = threading.Event()
                self.__done_events.append(done_event)
                self.__buffer_lock.release()
                done = done_event.wait(timeout)
                self.__buffer_lock.acquire()
                if not done:
                    raise Exception("Could not grab latest.")
            return self.__buffer.pop(0)