Skip to content

Commit 932e625

Browse files
authored
Create timer_esra_kaya.py
1 parent 21d3401 commit 932e625

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Week06/timer_esra_kaya.py

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

0 commit comments

Comments
 (0)