mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 13:48:21 +02:00
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:
parent
4e596fca83
commit
689f6bd9ba
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue