Skip to content

Commit 77682ba

Browse files
Create timer_beytullah_arslan.py
1 parent 24b3929 commit 77682ba

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎Week06/timer_beytullah_arslan.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import time
2+
class Timer():
3+
def __init__(self):
4+
self.start_time = None
5+
self.end_time = None
6+
7+
def __enter__(self):
8+
self.start_time = time.time()
9+
return self
10+
11+
def __exit__(self, exc_type, exc_val, exc_tb):
12+
self.end_time = time.time()
13+

0 commit comments

Comments
 (0)