freebsd-nq/usr.bin/top
Dimitry Andric a6f721ece8 Make fractional delays for top(1) work for interactive mode.
In r334906, the -s option was changed to allow fractional times, but
this only functioned correctly for batch mode.  In interactive mode, any
delay below 1.0 would get floored to zero.  This would put top(1) into a
tight loop, which could be difficult to interrupt.

Fix this by storing the -s option value (after validation) into a struct
timeval, and using that struct consistently for delaying with select(2).

Next up is to allow interactive entry of a fractional delay value.

MFC after:	3 days
2019-09-27 20:20:21 +00:00
..
commands.c top(1): reimplement header formatting as sbuf 2018-06-22 09:21:01 +00:00
commands.h top(1): move command mapping to commands.c 2018-06-12 06:53:31 +00:00
display.c top(1): support multibyte characters in command names (ARGV array) 2019-09-20 17:37:23 +00:00
display.h top(1): support multibyte characters in command names (ARGV array) 2019-09-20 17:37:23 +00:00
layout.h top(1): Migrate top to usr.bin 2018-05-19 22:40:23 +00:00
loadavg.h top(1): filter fewer warnings; clean up 2018-06-10 06:21:51 +00:00
machine.c top(1): support multibyte characters in command names (ARGV array) 2019-09-20 17:37:23 +00:00
machine.h top(1): garbage collect 2018-06-22 10:17:12 +00:00
Makefile Fix multiple warnings in usr.bin/top about variables shadowing global 2019-02-10 13:34:21 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
screen.c top(1): Use warnx and errx instead of fprintf 2018-08-22 10:07:15 +00:00
screen.h top(1): remove special handling of load > 5 2018-06-22 09:45:18 +00:00
top.1 Make fractional delays for top(1) work for interactive mode. 2019-09-27 20:20:21 +00:00
top.c Make fractional delays for top(1) work for interactive mode. 2019-09-27 20:20:21 +00:00
top.h top(1): Use warnx and errx instead of fprintf 2018-08-22 10:07:15 +00:00
username.c Fix multiple warnings in usr.bin/top about variables shadowing global 2019-02-10 13:34:21 +00:00
username.h top(1): partial revert of r334517 2018-06-03 05:20:11 +00:00
utils.c Fix multiple warnings in usr.bin/top about variables shadowing global 2019-02-10 13:34:21 +00:00
utils.h Fix multiple warnings in usr.bin/top about discarded qualifiers from 2019-02-10 13:31:08 +00:00