Skip to content

Commit cdae3c7

Browse files
authored
Merge pull request #784 from eceakinci56/patch-11
Create timer_ece_akinci.py
2 parents 2115a97 + 59a7f4d commit cdae3c7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Week06/timer_ece_akinci.py

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

0 commit comments

Comments
 (0)