mirror of
https://bitbucket.org/Mattrixwv/pytutorial.git
synced 2025-12-06 18:23:57 -05:00
Removed unnecessary code and added results section
This commit is contained in:
@@ -23,7 +23,6 @@ cnt = 0
|
|||||||
#A loop just to eat up time
|
#A loop just to eat up time
|
||||||
print("\n\nEntering loop")
|
print("\n\nEntering loop")
|
||||||
while(cnt < 10000):
|
while(cnt < 10000):
|
||||||
#print(cnt)
|
|
||||||
cnt = cnt + 1
|
cnt = cnt + 1
|
||||||
print("Exiting loop\n")
|
print("Exiting loop\n")
|
||||||
timer.stop()
|
timer.stop()
|
||||||
@@ -44,5 +43,28 @@ print(str(timer.getNanoseconds()) + " nanoseconds")
|
|||||||
print("\nEND OF TEST")
|
print("\nEND OF TEST")
|
||||||
|
|
||||||
"""Results:
|
"""Results:
|
||||||
|
BEGIN TEST
|
||||||
|
|
||||||
|
Trying to print the time before it has been started:
|
||||||
|
-1
|
||||||
|
Trying to print the time after stop was called, but before start was:
|
||||||
|
-1
|
||||||
|
Trying to print the time after it was started but before it was stopped:
|
||||||
|
654000
|
||||||
|
|
||||||
|
|
||||||
|
Entering loop
|
||||||
|
Exiting loop
|
||||||
|
|
||||||
|
Trying to print time after it was finished:
|
||||||
|
5426600
|
||||||
|
|
||||||
|
|
||||||
|
Print times in specific resolutions:
|
||||||
|
0.005427 seconds
|
||||||
|
5.4266 milliseconds
|
||||||
|
5426.6 microseconds
|
||||||
|
5426600 nanoseconds
|
||||||
|
|
||||||
|
END OF TEST
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user