Hello!
I need to have a base class which I will use to inherit other classes which I would like to measure execution time of its functions.
So intead of having something like this:
class Worker():
def doSomething(self):
start = time.time()
... do something
elapsed = (time.time() - start)
print "doSomething() took ", elapsed, " time to finish"
#outputs: doSomething() took XX time to finish
I would like to have something like this:
class Worker(BaseClass):
def doSomething(self):
... do something
#outputs the same: doSomething() took XX time to finish
So the BaseClass needs to dealing with measuring time