Mercurial > dovecot > original-hg > dovecot-1.2
comparison 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 |
comparison
equal
deleted
inserted
replaced
9309:bac1371c18e4 | 9310:f834d95f173a |
---|---|
1 #ifndef TIME_UTIL_H | |
2 #define TIME_UTIL_H | |
3 | |
4 /* Returns -1 if tv1<tv2, 1 if tv1>tv2, 0 if they're equal. */ | |
5 int timeval_cmp(const struct timeval *tv1, const struct timeval *tv2); | |
6 /* Returns tv1-tv2 in milliseconds. */ | |
7 int timeval_diff_msecs(const struct timeval *tv1, const struct timeval *tv2); | |
8 /* Returns tv1-tv2 in microseconds. */ | |
9 long long timeval_diff_usecs(const struct timeval *tv1, | |
10 const struct timeval *tv2); | |
11 | |
12 #endif |