FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python/SimpleStopWatch.py at master · txrxcode/Python · GitHub
txrxcode
/
Python
Public
forked from
geekcomputers/Python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Python
/
SimpleStopWatch.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (14 loc) · 515 Bytes
Breadcrumbs
Python
/
SimpleStopWatch.py
Copy path
File metadata and controls
16 lines (14 loc) · 515 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#Author: OMKAR PATHAK
#This script helps to build a simple stopwatch application using Python's time module.
import
time
print
(
'Press ENTER to begin, Press Ctrl + C to stop'
)
while
True
:
try
:
input
()
# For ENTER. Use raw_input() if you are running python 2.x instead of input()
starttime
=
time
.
time
()
print
(
'Started'
)
except
KeyboardInterrupt
:
print
(
'Stopped'
)
endtime
=
time
.
time
()
print
(
'Total Time:'
,
round
(
endtime
-
starttime
,
2
),
'secs'
)
break
Back
|
FazBrowse Home
|
New Git URL