HomeFreeBSD

Make fractional delays for top(1) work for interactive mode.

Description

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

Details

Provenance
dimAuthored on
Parents
rS352817: Merge in an up to date kernel from head.
Branches
Unknown
Tags
Unknown