MCPcopy Create free account
hub / github.com/ipython/ipython / clocks

Function clocks

IPython/utils/timing.py:35–42  ·  view source on GitHub ↗

clocks() -> floating point number Return the *SYSTEM* CPU time in seconds since the start of the process. This is done via a call to resource.getrusage, so it avoids the wraparound problems in time.clock().

()

Source from the content-addressed store, hash-verified

33 return resource.getrusage(resource.RUSAGE_SELF)[0]
34
35 def clocks():
36 """clocks() -> floating point number
37
38 Return the *SYSTEM* CPU time in seconds since the start of the process.
39 This is done via a call to resource.getrusage, so it avoids the
40 wraparound problems in time.clock()."""
41
42 return resource.getrusage(resource.RUSAGE_SELF)[1]
43
44 def clock():
45 """clock() -> floating point number

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected