2 * A simple nanosleep based sleep(1) replacement.
4 * Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
7 * SPDX-License-Identifier: GPL-2.0-or-later
15 main(int ac, char **av)
18 error_msg_and_fail("missing operand");
21 error_msg_and_fail("extra operand");
23 struct timespec ts = { atoi(av[1]), 0 };
25 if (nanosleep(&ts, NULL))
26 perror_msg_and_fail("nanosleep");