From: lsworkemail112 at gmail.com (Luke San Antonio)
Subject: [PATCH] Added code to output the age as seconds instead of "0 min."
Date: Sat, 18 Aug 2012 16:37:15 -0400 [thread overview]
Message-ID: <1345322235-23425-1-git-send-email-lsworkemail112@gmail.com> (raw)
---
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("<span class='age-mins'>%.0f sec.</span>",
+ secs * 1.0);
+ return;
+ }
if (secs < TM_HOUR * 2) {
htmlf("<span class='age-mins'>%.0f min.</span>",
secs * 1.0 / TM_MIN);
--
1.7.12-rc0
next reply other threads:[~2012-08-18 20:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-18 20:37 lsworkemail112 [this message]
2012-09-27 1:39 Maintaining My Own Cgit Tree Jason
2012-09-29 0:30 ` [PATCH] Added code to output the age as seconds instead of "0 min." lsworkemail112
2012-09-29 5:20 ` Jason
2012-09-29 18:43 ` lsworkemail112
2012-09-29 18:51 ` Jason
2012-09-29 19:14 ` lsworkemail112
2012-09-29 19:15 ` Jason
2012-09-29 19:17 ` lsworkemail112
2012-09-29 19:16 ` lsworkemail112
2012-09-30 5:51 ` mailings
2012-09-30 17:28 ` lsworkemail112
2012-09-30 17:29 ` Jason
2012-09-30 17:40 ` mailings
2012-09-30 21:06 ` lsworkemail112
2012-09-30 21:33 ` Jason
2012-10-01 6:12 ` mailings
2012-10-02 1:46 ` lsworkemail112
2012-10-02 2:04 ` Jason
2012-10-02 2:08 ` lsworkemail112
2012-10-01 13:56 ` webmaster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345322235-23425-1-git-send-email-lsworkemail112@gmail.com \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).