time-util.c revision c3c07d6527ad28c8546cbbf84c257d178e23c184
2454dfa32c93c20a8522c6ed42fe057baaac9f9aStephan Bosch/* Copyright (c) 2008-2011 Dovecot authors, see the included COPYING file */
7ef3553585e556f35d5919589cfdc1de3329e4bbTimo Sirainenint timeval_cmp(const struct timeval *tv1, const struct timeval *tv2)
e28b88ee83b47dc2257140600f491482704c7b79Stephan Boschint timeval_diff_msecs(const struct timeval *tv1, const struct timeval *tv2)
e28b88ee83b47dc2257140600f491482704c7b79Stephan Boschlong long timeval_diff_usecs(const struct timeval *tv1,
2f2244332687187931e9541e5ff312aa6c5aa705Timo Sirainen return ((long long)secs * 1000000ULL) + usecs;
7ef3553585e556f35d5919589cfdc1de3329e4bbTimo Sirainenconst char *t_strflocaltime(const char *fmt, time_t t)
7ef3553585e556f35d5919589cfdc1de3329e4bbTimo Sirainen while ((ret = strftime(buf, bufsize, fmt, tm)) == 0) {