Skip to content

Commit c57b10e

Browse files
Merge pull request geekcomputers#428 from codePrady/master
Update SimpleStopWatch.py
2 parents 2edd194 + 711af36 commit c57b10e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,9 @@ In the scripts the comments and other documents are lined up correctly when they
6060
- [Google_News.py](https://github.com/geekcomputers/Python/blob/master/Google_News.py) - Uses BeautifulSoup to provide Latest News Headline along with news link.
6161

6262
- [cricket_live_score](https://github.com/geekcomputers/Python/blob/master/Cricket_score.py) - Uses BeautifulSoup to provide live cricket score.
63+
6364
- [youtube.py](https://github.com/geekcomputers/Python/blob/master/youtube.py) - Takes a song name as input and fetches the YouTube url of the best matching song and plays it.
64-
- [site_health.py](https://github.com/geekcomputers/Python/blob/master/youtube.py) - This script is very useful for when you just to do a health check on a remote server.
65+
66+
- [site_health.py](https://github.com/geekcomputers/Python/blob/master/site_health.py) - This script is very useful for when you just to do a health check on a remote server.
67+
68+
- [SimpleStopWatch.py](https://github.com/geekcomputers/Python/blob/master/SimpleStopWatch.py) - Simple Stop Watch implementation using Python's time module.

SimpleStopWatch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
input() # For ENTER. Use raw_input() if you are running python 2.x instead of input()
1010
starttime = time.time()
1111
print('Started')
12+
while True:
13+
print('Time Elapsed: ', round(time.time() - starttime, 0), 'secs', end="\r")
14+
time.sleep(1)
1215
except KeyboardInterrupt:
1316
print('Stopped')
1417
endtime = time.time()

0 commit comments

Comments
 (0)