time: earlier exit from format_timestamp_relative() on special times
This commit is contained in:
parent
e73c78c275
commit
65de0395ff
|
@ -219,11 +219,10 @@ char *format_timestamp_relative(char *buf, size_t l, usec_t t) {
|
|||
const char *s;
|
||||
usec_t n, d;
|
||||
|
||||
n = now(CLOCK_REALTIME);
|
||||
|
||||
if (t <= 0 || (t == USEC_INFINITY))
|
||||
if (t <= 0 || t == USEC_INFINITY)
|
||||
return NULL;
|
||||
|
||||
n = now(CLOCK_REALTIME);
|
||||
if (n > t) {
|
||||
d = n - t;
|
||||
s = "ago";
|
||||
|
|
Loading…
Reference in a new issue