Show More
@@ -23,6 +23,11 b' import time' | |||||
23 | # If possible (Unix), use the resource module instead of time.clock() |
|
23 | # If possible (Unix), use the resource module instead of time.clock() | |
24 | try: |
|
24 | try: | |
25 | import resource |
|
25 | import resource | |
|
26 | except ImportError: | |||
|
27 | resource = None | |||
|
28 | ||||
|
29 | # Some implementations (like jyputerlite) don't have getrusage | |||
|
30 | if resource not None and hasattr(resource, "getrusage"): | |||
26 | def clocku(): |
|
31 | def clocku(): | |
27 | """clocku() -> floating point number |
|
32 | """clocku() -> floating point number | |
28 |
|
33 |
General Comments 0
You need to be logged in to leave comments.
Login now