def __exit__(self, *args): self.end = config.wallTime() #time.clock() self.interval = self.end - self.start print('{:.3g}s'.format(self.interval))
def __enter__(self): self.start = config.wallTime() #time.clock() return self