def _GetProcessStartTime(pid):
  p = psutil.Process(pid)
  if inspect.ismethod(p.create_time):
    return p.create_time()
  else:  # Process.create_time is a property in old versions of psutil.
    return p.create_time