get_clock_info() function in python by R4R Team

- get_clock_info() is a python function which get the clock info of the monotonic,process_time etc.

Syntax-

time.get_clock_info(clock)


program-

import time

names = ['time', 'monotonic', 'perf_counter', 'process_time']

for n in names:
info = time.get_clock_info(n)
print(info)


output-

namespace(adjustable=True, implementation='GetSystemTimeAsFileTime()', monotonic=False, resolution=0.015625)
namespace(adjustable=False, implementation='GetTickCount64()', monotonic=True, resolution=0.015625)
namespace(adjustable=False, implementation='QueryPerformanceCounter()', monotonic=True, resolution=5.131857958382684e-07)
namespace(adjustable=False, implementation='GetProcessTimes()', monotonic=True, resolution=1e-07)


-In this program we have a list of different clocks i.e. names = ['time', 'monotonic', 'perf_counter', 'process_time'], so we print the information of all the clocks in this list.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!