irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pid_age.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 from __future__ import print_function
3 import sys
4 import psutil
5 import time
6 
7 def get_create_time(process):
8  if psutil.version_info >= (2,0):
9  return process.create_time()
10  return process.create_time
11 
12 pid = int(sys.argv[1])
13 p = psutil.Process(pid)
14 print(time.time() - get_create_time(p))
pid_age.get_create_time
def get_create_time(process)
Definition: pid_age.py:7
int
typedef int((*funcPtr)())