os.times()

os.times()

Returns the current global process times. The return value is an object with five attributes:

  • user - user time
  • system - system time
  • children_user - user time of all child processes
  • children_system - system time of all child processes
  • elapsed - elapsed real time since a fixed point in the past

For backwards compatibility, this object also behaves like a five-tuple containing user, system, children_user, children_system, and elapsed in that order.

See the Unix manual page times(2) or the corresponding Windows Platform API documentation. On Windows, only user and system are known; the other attributes are zero.

Availability: Unix, Windows.

Changed in version 3.3: Return type changed from a tuple to a tuple-like object with named attributes.

doc_python
2016-10-07 17:40:07
Comments
Leave a Comment

Please login to continue.