Mercurial > dovecot > original-hg > dovecot-1.2
view src/lib/time-util.h @ 9310:f834d95f173a HEAD
Moved all struct timeval comparing/calculation code to lib/time-util.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 12 Aug 2009 16:59:47 -0400 |
parents | |
children | 8ca1f9f1ef2e |
line wrap: on
line source
#ifndef TIME_UTIL_H #define TIME_UTIL_H /* Returns -1 if tv1<tv2, 1 if tv1>tv2, 0 if they're equal. */ int timeval_cmp(const struct timeval *tv1, const struct timeval *tv2); /* Returns tv1-tv2 in milliseconds. */ int timeval_diff_msecs(const struct timeval *tv1, const struct timeval *tv2); /* Returns tv1-tv2 in microseconds. */ long long timeval_diff_usecs(const struct timeval *tv1, const struct timeval *tv2); #endif