mirror of
https://bitbucket.org/Mattrixwv/pytutorial.git
synced 2025-12-06 18:23:57 -05:00
31 lines
754 B
Python
31 lines
754 B
Python
#~/Programs/Python/pyTutorial/testStopwatch.py
|
|
#Matthew Ellison
|
|
# Created: 1-24-19
|
|
#Modified: 1-24-19
|
|
#This is a simple test script for the Stopwatch class
|
|
|
|
from Stopwatch import Stopwatch
|
|
|
|
timer = Stopwatch()
|
|
print("Trying to print the time before it has been started:")
|
|
print(str(timer.getTime()))
|
|
timer.stop()
|
|
print("Trying to print the time after stop was called, but before start was")
|
|
print(str(timer.getTime()))
|
|
timer.start()
|
|
print("Trying to print the time after it was started but before it was stopped:")
|
|
print(str(timer.getTime()))
|
|
cnt = 0
|
|
print("Entering loop:")
|
|
while(cnt < 1000):
|
|
print(cnt)
|
|
cnt = cnt + 1
|
|
print("Exiting loop")
|
|
timer.stop()
|
|
print("Trying to print time after it was finished")
|
|
print(str(timer.getTime()))
|
|
|
|
"""Results:
|
|
|
|
"""
|