From cf07aa2fc6a50b2fd2ff8bd2d0953818bee33690 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 May 2016 15:35:56 +0100 Subject: [PATCH] lib: Fixup u64 multiply for computing nanoseconds 32bit builds ran into a silly multiplication issue when computing elapsed nanoseconds of more than 2s... Signed-off-by: Chris Wilson --- lib/igt_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 795bcae9..4f23b12d 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -412,7 +412,7 @@ uint64_t igt_nsec_elapsed(struct timespec *start) } return ((now.tv_nsec - start->tv_nsec) + - NSEC_PER_SEC*(now.tv_sec - start->tv_sec)); + (uint64_t)NSEC_PER_SEC*(now.tv_sec - start->tv_sec)); } bool __igt_fixture(void)