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

Function clocku

IPython/utils/timing.py:26–33  ·  view source on GitHub ↗

clocku() -> floating point number Return the *USER* 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

24try:
25 import resource
26 def clocku():
27 """clocku() -> floating point number
28
29 Return the *USER* CPU time in seconds since the start of the process.
30 This is done via a call to resource.getrusage, so it avoids the
31 wraparound problems in time.clock()."""
32
33 return resource.getrusage(resource.RUSAGE_SELF)[0]
34
35 def clocks():
36 """clocks() -> floating point number

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected