summaryrefslogtreecommitdiffstats
path: root/pimd/pim_time.c
diff options
context:
space:
mode:
authorEverton Marques <everton.marques@gmail.com>2010-03-17 10:34:24 -0300
committerDavid Lamparter <equinox@opensourcerouting.org>2015-02-04 06:07:53 +0100
commitff752d431675caed78e7b460b2d9a4845e5b6a73 (patch)
tree1f1b8a238f202c372007d9f19141ce010515a550 /pimd/pim_time.c
parent0ef36d82d87094b32f71be47a73144459f057db9 (diff)
downloadquagga-ff752d431675caed78e7b460b2d9a4845e5b6a73.tar.bz2
quagga-ff752d431675caed78e7b460b2d9a4845e5b6a73.tar.xz
[pim] Cosmetic RPF refresh timer display
Diffstat (limited to 'pimd/pim_time.c')
-rw-r--r--pimd/pim_time.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pimd/pim_time.c b/pimd/pim_time.c
index 07719608..7d4581d9 100644
--- a/pimd/pim_time.c
+++ b/pimd/pim_time.c
@@ -190,6 +190,14 @@ void pim_time_uptime(char *buf, int buf_size, int64_t uptime_sec)
pim_time_hhmmss(buf, buf_size, uptime_sec);
}
+void pim_time_uptime_begin(char *buf, int buf_size, int64_t now, int64_t begin)
+{
+ if (begin > 0)
+ pim_time_uptime(buf, buf_size, now - begin);
+ else
+ snprintf(buf, buf_size, "--:--:--");
+}
+
long pim_time_timer_remain_msec(struct thread *t_timer)
{
/* FIXME: Actually fetch msec resolution from thread */