From mboxrd@z Thu Jan 1 00:00:00 1970
From: lsworkemail112 at gmail.com (Luke San Antonio)
Date: Sat, 18 Aug 2012 16:37:15 -0400
Subject: [PATCH] Added code to output the age as seconds instead of "0 min."
Message-ID: <1345322235-23425-1-git-send-email-lsworkemail112@gmail.com>
---
ui-shared.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui-shared.c b/ui-shared.c
index 43166af..a1f9d70 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -594,6 +594,11 @@ void cgit_print_age(time_t t, time_t max_relative, const char *format)
return;
}
+ if (secs < TM_MIN) {
+ htmlf("%.0f sec.",
+ secs * 1.0);
+ return;
+ }
if (secs < TM_HOUR * 2) {
htmlf("%.0f min.",
secs * 1.0 / TM_MIN);
--
1.7.12-rc0