MINOR: tools: add print_time_short() to print a condensed duration value
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 09:47:52 +0000 (10:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:10:33 +0000 (12:10 +0100)
commit4deeb1055f8f7e3feec195233f1ad3b3bf90accb
tree5b60316e8b8edb91d5d73781df90bbaf48d4f909
parent87ef32397101c7bc4783982af952da12c1750e88
MINOR: tools: add print_time_short() to print a condensed duration value

When reporting some values in debugging output we often need to have
some condensed, stable-length values. This function prints a duration
from nanosecond to years with at least 4 digits of accuracy using the
most suitable unit, always on 7 chars.
include/haproxy/tools.h
src/tools.c