time.get_clock_info()

time.get_clock_info(name)

Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are:

  • 'clock': time.clock()
  • 'monotonic': time.monotonic()
  • 'perf_counter': time.perf_counter()
  • 'process_time': time.process_time()
  • 'time': time.time()

The result has the following attributes:

  • adjustable: True if the clock can be changed automatically (e.g. by a NTP daemon) or manually by the system administrator, False otherwise
  • implementation: The name of the underlying C function used to get the clock value
  • monotonic: True if the clock cannot go backward, False otherwise
  • resolution: The resolution of the clock in seconds (float)

New in version 3.3.

doc_python
2016-10-07 17:44:41
Comments
Leave a Comment

Please login to continue.