analyze: also print unix time in "timestamp"

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-05-21 09:56:41 +02:00
parent c269607f9b
commit ea62aa24ae
2 changed files with 16 additions and 7 deletions
+6
View File
@@ -1735,6 +1735,12 @@ static int test_timestamp_one(const char *p) {
if (!in_utc_timezone())
printf(" (in UTC): %s\n", format_timestamp_utc(buf, sizeof buf, usec));
printf(" UNIX seconds: @%"PRI_USEC"%s%0*"PRI_USEC"\n",
usec / USEC_PER_SEC,
usec % USEC_PER_SEC ? "." : "",
usec % USEC_PER_SEC ? 6 : 0,
usec % USEC_PER_SEC);
printf(" From now: %s\n", format_timestamp_relative(buf, sizeof buf, usec));
return 0;