Created
September 1, 2020 08:37
-
-
Save Kush1101/5fa80d4f8793668c12d532389a57e419 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
def function_1(*parameters): | |
#do something | |
# return value | |
def function_2(*parameters): | |
#do something | |
#return value | |
#measuring time taken by function_1 | |
start_of_f1 = time.time() | |
value1 = function_1(*parameters) | |
end_of_f1 = time.time() | |
print(f"The time taken by function_1 is:{start_of_f1-end_of_f1}") | |
#measuring time teaken by function_2 | |
start_of_f2 = time.time() | |
value2 = function_1(*parameters) | |
end_of_f2 = time.time() | |
print(f"The time taken by function_1 is:{start_of_f2-end_of_f2}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment