From 1bb46cda4b5d9c51ea4a9f9afc21f28d49e47c9e Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:59:42 +0800 Subject: [PATCH] Switch to `perf_counter()` for latency measurement (#19177) Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> --- ultralytics/utils/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/utils/ops.py b/ultralytics/utils/ops.py index af41ffee..84e24a4b 100644 --- a/ultralytics/utils/ops.py +++ b/ultralytics/utils/ops.py @@ -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):