From ec16c030bd5527137f95a1c30e6a1f3c9054dcf7 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 29 Nov 2020 11:37:34 +0100 Subject: libbb: introduce and use sleep1() function old new delta sleep1 - 9 +9 run_shutdown_and_kill_processes 97 95 -2 restore_state_and_exit 116 114 -2 reread_partition_table 67 65 -2 flush_buffer_cache 80 78 -2 chat_main 1302 1300 -2 timeout_main 310 307 -3 telnet_main 1235 1232 -3 stop_handler 86 83 -3 process_action 1078 1075 -3 nbdclient_main 1185 1182 -3 init_main 789 786 -3 getty_main 1541 1538 -3 do_time 410 407 -3 runsv_main 1682 1677 -5 pause_and_low_level_reboot 59 54 -5 inetd_main 1917 1911 -6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 9/-50) Total: -41 bytes Signed-off-by: Denys Vlasenko --- runit/runsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runit') diff --git a/runit/runsv.c b/runit/runsv.c index 36d85101e..7e22862cd 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -651,7 +651,7 @@ int runsv_main(int argc UNUSED_PARAM, char **argv) gettimeofday_ns(&svd[0].start); update_status(&svd[0]); if (LESS(svd[0].start.tv_sec, deadline)) - sleep(1); + sleep1(); } if (haslog) { if (child == svd[1].pid) { @@ -664,7 +664,7 @@ int runsv_main(int argc UNUSED_PARAM, char **argv) gettimeofday_ns(&svd[1].start); update_status(&svd[1]); if (LESS(svd[1].start.tv_sec, deadline)) - sleep(1); + sleep1(); } } } /* for (;;) */ -- cgit v1.2.3