You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
237 B
13 lines
237 B
1 year ago
|
import datetime as dt
|
||
|
|
||
|
class Timer():
|
||
|
|
||
|
def __init__(self):
|
||
|
self.start_dt = None
|
||
|
|
||
|
def start(self):
|
||
|
self.start_dt = dt.datetime.now()
|
||
|
|
||
|
def stop(self):
|
||
|
end_dt = dt.datetime.now()
|
||
|
print('Time taken: %s' % (end_dt - self.start_dt))
|