From 7952eac95556b95b78444f090da5dd64f0a58127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BA=C5=9EAK=20KO=C3=87AN?= <159764779+mimo-o@users.noreply.github.com> Date: Sat, 4 Apr 2026 21:10:33 +0300 Subject: [PATCH] Create timer_basak_kocan.py --- Week06/timer_basak_kocan.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Week06/timer_basak_kocan.py diff --git a/Week06/timer_basak_kocan.py b/Week06/timer_basak_kocan.py new file mode 100644 index 00000000..7d254c8b --- /dev/null +++ b/Week06/timer_basak_kocan.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()