Skip to content

Commit

Permalink
change exception, q mechanism to exit loop and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Nov 24, 2012
1 parent 1415dca commit fb3a1fd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mmTimer.py
Expand Up @@ -24,9 +24,7 @@ def Loop(x,y,a,b):
#set an initial Target time for first iteration and round up to a whole second
Target = math.ceil(time.time())

Run = True

while Run == True:
while True:
try:
Start = time.time()

Expand Down Expand Up @@ -65,7 +63,8 @@ def Loop(x,y,a,b):
except KeyboardInterrupt:
input = raw_input(' ===> ')
if input == 'q':
'''stop loop'''
Run = False
'''stop loop. sys.exit() will execute a finally block if defined, it doesn't exit right away'''
from sys import exit
exit()
else:
pass

0 comments on commit fb3a1fd

Please sign in to comment.