shared/format-table: optionally print timestamps without "left"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 22 Feb 2023 22:40:04 +0000 (23:40 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 22 Feb 2023 22:43:33 +0000 (23:43 +0100)
commitd5e6f36c7a5a2702c6bcf750cbe9815ff98cac48
tree785c7c6033d55a505aa72f2aef105c5f43ee6abe
parent81cfea95e51c72da6765b517e7038b3e7e3dec9f
shared/format-table: optionally print timestamps without "left"

This just adds the base functionality and some unit tests.
With TABLE_TIMESTAMP_RELATIVE we print "5s ago" and "5s left",
with the new TABLE_TIMESTAMP_LEFT, we print "5s ago" but "5s".
This is more useful for cases where we generally only want to
print timestamps in the future.
src/basic/time-util.c
src/basic/time-util.h
src/shared/format-table.c
src/shared/format-table.h
src/test/test-time-util.c