(info_add)
| 462 | |
| 463 | |
| 464 | def collect_time(info_add): |
| 465 | import time |
| 466 | |
| 467 | info_add('time.time', time.time()) |
| 468 | |
| 469 | attributes = ( |
| 470 | 'altzone', |
| 471 | 'daylight', |
| 472 | 'timezone', |
| 473 | 'tzname', |
| 474 | ) |
| 475 | copy_attributes(info_add, time, 'time.%s', attributes) |
| 476 | |
| 477 | if hasattr(time, 'get_clock_info'): |
| 478 | for clock in ('clock', 'monotonic', 'perf_counter', |
| 479 | 'process_time', 'thread_time', 'time'): |
| 480 | try: |
| 481 | # prevent DeprecatingWarning on get_clock_info('clock') |
| 482 | with warnings.catch_warnings(record=True): |
| 483 | clock_info = time.get_clock_info(clock) |
| 484 | except ValueError: |
| 485 | # missing clock like time.thread_time() |
| 486 | pass |
| 487 | else: |
| 488 | info_add('time.get_clock_info(%s)' % clock, clock_info) |
| 489 | |
| 490 | |
| 491 | def collect_curses(info_add): |
nothing calls this directly
no test coverage detected
searching dependent graphs…