Quick alternative
import timeit
start = timeit.default_timer()
#Your statements here
stop = timeit.default_timer()
print('Time: ', stop - start)
More Related Contents:
- How do I get the current time?
- how to sort pandas dataframe from one column
- Python’s time.clock() vs. time.time() accuracy?
- How to calculate the time interval between two time strings
- What is the standard way to add N seconds to datetime.time in Python?
- Display the time in a different time zone
- Tkinter — executing functions over time
- How to add property to a class dynamically?
- Start a Function at Given Time
- Python regex match OR operator
- High-precision clock in Python
- How to add delta to python datetime.time?
- Python: dynamically create function at runtime
- Does Python’s time.time() return the local or UTC timestamp?
- Python module to change system date and time
- Python: give start and end of week data from a given date
- Python daylight savings time
- How to get current time in python and break up into year, month, day, hour, minute?
- python date of the previous month
- Calculating Time Difference
- Using %f with strftime() in Python to get microseconds
- How can I speed up fetching pages with urllib2 in python?
- Python time measure function
- Get POSIX/Unix time in seconds and nanoseconds in Python?
- Python: Figure out local timezone
- How to get the seconds since epoch from the time + date output of gmtime()?
- Time delay Tkinter
- How to convert epoch time with nanoseconds to human-readable?
- Equivalent to GetTickCount() on Linux
- Upper limit in Python time.sleep()?