Switch to perf_counter() for latency measurement (#19177)

Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
This commit is contained in:
Mohammed Yasin 2025-02-12 18:59:42 +08:00 committed by GitHub
parent 9d8c2fe3c7
commit 1bb46cda4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,7 @@ class Profile(contextlib.ContextDecorator):
"""Get current time."""
if self.cuda:
torch.cuda.synchronize(self.device)
return time.time()
return time.perf_counter()
def segment2box(segment, width=640, height=640):