time counter in python

Solutions on MaxInterview for time counter in python by the best coders in the world

showing results for - "time counter in python"
Ariana
29 Oct 2016
1import time
2
3start = time.time()
4print("hello")
5end = time.time()
6print(end - start)
7/*
8*On Unix, return the current processor time as a floating point number expressed in seconds. The precision, and in fact the very definition of the meaning of “processor time”, depends on that of the C function of the same name.
9
10*On Windows, this function returns wall-clock seconds elapsed since the first call to this function, as a floating point number, based on the Win32 function QueryPerformanceCounter(). The resolution is typically better than one microsecond.
11
12*Deprecated since version 3.3: The behaviour of this function depends on the platform: use perf_counter() or process_time() instead, depending on your requirements, to have a well defined behaviour.
13*/
14