This commit is contained in:
2019-01-25 20:29:20 -05:00

View File

@@ -23,7 +23,6 @@ cnt = 0
#A loop just to eat up time
print("\n\nEntering loop")
while(cnt < 10000):
#print(cnt)
cnt = cnt + 1
print("Exiting loop\n")
timer.stop()
@@ -44,5 +43,28 @@ print(str(timer.getNanoseconds()) + " nanoseconds")
print("\nEND OF TEST")
"""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
"""