aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-07-27 16:23:53 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2009-07-27 16:23:53 +0200
commit7b716878cb6837756bd65ed788e5d8d89d8af56c (patch)
tree80839cd8fe6fdaf9bc471294821516aae462511f /src/common/util.h
parent2b0e8fb39f0ac9c0bfadc64102440843300fa9d7 (diff)
downloadtor-7b716878cb6837756bd65ed788e5d8d89d8af56c.tar.gz
tor-7b716878cb6837756bd65ed788e5d8d89d8af56c.zip
Fix dirreq and cell stats on 32-bit architectures.
When determining how long directory requests take or how long cells spend in queues, we were comparing timestamps on microsecond detail only to convert results to second or millisecond detail later on. But on 32-bit architectures this means that 2^31 microseconds only cover time differences of up to 36 minutes. Instead, compare timestamps on millisecond detail.
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 1c5643be39..c7741a64ac 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -211,6 +211,7 @@ int base16_decode(char *dest, size_t destlen, const char *src, size_t srclen);
/* Time helpers */
long tv_udiff(const struct timeval *start, const struct timeval *end);
+long tv_mdiff(const struct timeval *start, const struct timeval *end);
time_t tor_timegm(struct tm *tm);
#define RFC1123_TIME_LEN 29
void format_rfc1123_time(char *buf, time_t t);