[Toybox] [PATCH] Support fractional seconds (and other time units) in `top -d`.

enh enh at google.com
Thu May 3 15:25:23 PDT 2018


LTP uses `top -d 0.1`, which isn't convincingly useful, but general
support for other time units might be useful, and switching to xparsetime
addresses both at once.

Also fix 3169d948c049664bcf7216d4c4ae751881099d3e where I mistakenly
treated `rev` and `toys.optflags&FLAG_b` as interchangeable. (Without
this second fix, `top -b` looks fine but `top` is broken!)

Also fix xparsetime to reject input such as "monkey" or "1monkey".
---
 lib/xwrap.c     | 10 +++++++---
 tests/top.test  |  6 ++++++
 toys/posix/ps.c | 23 +++++++++++++++--------
 3 files changed, 28 insertions(+), 11 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180503/ba0ef7cd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-fractional-seconds-and-other-time-units-in-t.patch
Type: text/x-patch
Size: 4886 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180503/ba0ef7cd/attachment-0002.bin>


More information about the Toybox mailing list