From 59a7f4d5a10025a504148732452e85dba3a1a420 Mon Sep 17 00:00:00 2001 From: eceakinci56 <161435547+eceakinci56@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:31:38 +0300 Subject: [PATCH] Create timer_ece_akinci.py --- Week06/timer_ece_akinci.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Week06/timer_ece_akinci.py diff --git a/Week06/timer_ece_akinci.py b/Week06/timer_ece_akinci.py new file mode 100644 index 00000000..de2a4024 --- /dev/null +++ b/Week06/timer_ece_akinci.py @@ -0,0 +1,11 @@ +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()