diff --git a/testStopwatch.py b/testStopwatch.py index 361fb40..9240c9e 100644 --- a/testStopwatch.py +++ b/testStopwatch.py @@ -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 """