diff --git a/Week06/timer_beytullah_arslan.py b/Week06/timer_beytullah_arslan.py new file mode 100644 index 00000000..4cfbd390 --- /dev/null +++ b/Week06/timer_beytullah_arslan.py @@ -0,0 +1,13 @@ +import time +class Timer(): + def __init__(self): + self.start_time = None + self.end_time = None + + def __enter__(self): + self.start_time = time.time() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.end_time = time.time() +