diff options
Diffstat (limited to 'pimd/pim_time.c')
-rw-r--r-- | pimd/pim_time.c | 8 |
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 */ |