MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / checkpoint

Method checkpoint

utils/timer.py:19–30  ·  view source on GitHub ↗
(self, name='')

Source from the content-addressed store, hash-verified

17 return (time.time() - self.__last) * 1000
18
19 def checkpoint(self, name=''):
20 text = 'Timer - {timer} - {checkpoint} - {last:.2f}ms ({elapsed:.2f}ms elapsed)'.format(
21 timer=self.name,
22 checkpoint=name,
23 last=self.last,
24 elapsed=self.elapsed
25 ).strip()
26 self.__last = time.time()
27 if self.logger:
28 self.logger.debug(text)
29 else:
30 print(text)
31
32 def __enter__(self):
33 return self

Callers 1

__exit__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected