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

Function clock2

IPython/utils/timing.py:54–58  ·  view source on GitHub ↗

clock2() -> (t_user,t_system) Similar to clock(), but return a tuple of user/system times.

()

Source from the content-addressed store, hash-verified

52 return u+s
53
54 def clock2():
55 """clock2() -> (t_user,t_system)
56
57 Similar to clock(), but return a tuple of user/system times."""
58 return resource.getrusage(resource.RUSAGE_SELF)[:2]
59except ImportError:
60 # There is no distinction of user/system time under windows, so we just use
61 # time.perff_counter() for everything...

Callers 2

_run_with_timingMethod · 0.90
timeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected