clock() -> floating point number Return the *TOTAL USER+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().
()
| 50 | return resource.getrusage(resource.RUSAGE_SELF)[1] |
| 51 | |
| 52 | def clock(): |
| 53 | """clock() -> floating point number |
| 54 | |
| 55 | Return the *TOTAL USER+SYSTEM* CPU time in seconds since the start of |
| 56 | the process. This is done via a call to resource.getrusage, so it |
| 57 | avoids the wraparound problems in time.clock().""" |
| 58 | |
| 59 | u,s = resource.getrusage(resource.RUSAGE_SELF)[:2] |
| 60 | return u+s |
| 61 | |
| 62 | def clock2() -> tuple[float, float]: |
| 63 | """clock2() -> (t_user,t_system) |
no outgoing calls
no test coverage detected
searching dependent graphs…