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().
()
| 42 | return resource.getrusage(resource.RUSAGE_SELF)[1] |
| 43 | |
| 44 | def clock(): |
| 45 | """clock() -> floating point number |
| 46 | |
| 47 | Return the *TOTAL USER+SYSTEM* CPU time in seconds since the start of |
| 48 | the process. This is done via a call to resource.getrusage, so it |
| 49 | avoids the wraparound problems in time.clock().""" |
| 50 | |
| 51 | u,s = resource.getrusage(resource.RUSAGE_SELF)[:2] |
| 52 | return u+s |
| 53 | |
| 54 | def clock2(): |
| 55 | """clock2() -> (t_user,t_system) |
no outgoing calls
no test coverage detected