MCPcopy Index your code
hub / github.com/alievk/avatarify-python / TicToc

Class TicToc

afy/utils.py:65–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65class TicToc:
66 def __init__(self):
67 self.t = None
68 self.t_init = time.time()
69
70 def tic(self):
71 self.t = time.time()
72
73 def toc(self, total=False):
74 if total:
75 return (time.time() - self.t_init) * 1000
76
77 assert self.t, 'You forgot to call tic()'
78 return (time.time() - self.t) * 1000
79
80 def tocp(self, str):
81 t = self.toc()
82 log(f"{str} took {t:.4f}ms")
83 return t
84
85
86class AccumDict:

Callers 7

_send_recv_asyncMethod · 0.90
send_workerMethod · 0.90
recv_workerMethod · 0.90
cam_fomm.pyFile · 0.90
recv_workerMethod · 0.90
predictor_workerMethod · 0.90
send_workerMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected