c/mock: Clarify that wait_image timeout is nanoseconds

This commit is contained in:
Ryan Pavlik 2022-05-17 13:16:32 -05:00 committed by Jakob Bornecrantz
parent 1cd435f321
commit 1b01eb808c
2 changed files with 3 additions and 3 deletions

View file

@ -28,13 +28,13 @@ mock_compositor_swapchain_destroy(struct xrt_swapchain *xsc)
} }
static xrt_result_t static xrt_result_t
mock_compositor_swapchain_wait_image(struct xrt_swapchain *xsc, uint64_t timeout, uint32_t index) mock_compositor_swapchain_wait_image(struct xrt_swapchain *xsc, uint64_t timeout_ns, uint32_t index)
{ {
struct mock_compositor_swapchain *mcsc = mock_compositor_swapchain(xsc); struct mock_compositor_swapchain *mcsc = mock_compositor_swapchain(xsc);
struct mock_compositor *mc = mcsc->mc; struct mock_compositor *mc = mcsc->mc;
if (mc->swapchain_hooks.wait_image) { if (mc->swapchain_hooks.wait_image) {
return mc->swapchain_hooks.wait_image(mc, mcsc, timeout, index); return mc->swapchain_hooks.wait_image(mc, mcsc, timeout_ns, index);
} }
mcsc->waited[index] = true; mcsc->waited[index] = true;
return XRT_SUCCESS; return XRT_SUCCESS;

View file

@ -270,7 +270,7 @@ struct mock_compositor
*/ */
xrt_result_t (*wait_image)(struct mock_compositor *mc, xrt_result_t (*wait_image)(struct mock_compositor *mc,
struct mock_compositor_swapchain *mcsc, struct mock_compositor_swapchain *mcsc,
uint64_t timeout, uint64_t timeout_ns,
uint32_t index); uint32_t index);
/*! /*!