reftable/stack: stop using sleep_millisec()

Refactor our use of `sleep_millisec()` by open-coding it with poll(3p),
which is the current implementation of this function. Ideally, we'd use
a more direct way to sleep, but there is no equivalent to sleep(3p) that
would accept milliseconds as input.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-02-18 10:20:48 +01:00
committed by Junio C Hamano
parent 712f6cfe54
commit 10f2935c7f

View File

@@ -524,7 +524,7 @@ static int reftable_stack_reload_maybe_reuse(struct reftable_stack *st,
fd = -1; fd = -1;
delay = delay + (delay * reftable_rand()) / UINT32_MAX + 1; delay = delay + (delay * reftable_rand()) / UINT32_MAX + 1;
sleep_millisec(delay); poll(NULL, 0, delay);
} }
out: out: