time-util.c revision 5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainen/* Copyright (c) 2008-2013 Dovecot authors, see the included COPYING file */
965ed6ea3fc8f7637bd0d159d2fdb283a191ce34Timo Sirainenint timeval_cmp(const struct timeval *tv1, const struct timeval *tv2)
3e1ded79bbc9166aa221bcf62d8eb2bee179c557Timo Sirainenint timeval_diff_msecs(const struct timeval *tv1, const struct timeval *tv2)
48559742084e98049335c21c53dfd1ff95f11cd8Timo Sirainenlong long timeval_diff_usecs(const struct timeval *tv1,
b567e0172c73dcf7642462e86962060358dd5f28Timo Sirainen return ((long long)secs * 1000000ULL) + usecs;
10c5fd417af4ee30b68c967f5e7d5a49f4f149b5Timo Sirainenconst char *t_strflocaltime(const char *fmt, time_t t)
e65cc79f80577e83c706f0678c78e2c0bd91434fTimo Sirainen while ((ret = strftime(buf, bufsize, fmt, tm)) == 0) {