renderer-gl: Improve accurancy when printing elapsed time

This avoids truncation to zero, by using an explicit cast to float and
print out properly the last 2 digits.

43 / 1000 = 0.00
43 / 1000.0 = 0.04

Fixes: 2d70cbf037

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2026-05-01 15:31:17 +03:00
parent 4e596fca83
commit 689f6bd9ba

View file

@ -734,7 +734,7 @@ timeline_render_point_handler(int fd, uint32_t mask, void *data)
" - end: %" PRId64 ".%09ld - elapsed: %.2f us\n",
(int64_t) begin.tv_sec, begin.tv_nsec,
(int64_t) end.tv_sec, end.tv_nsec,
(float) (elapsed / 1000));
(float) (elapsed / 1000.0f));
}