mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Apply algebra; remove a condition
svn:r246
This commit is contained in:
parent
2da6482f63
commit
598c3069e1
@ -30,10 +30,15 @@ tv_udiff(struct timeval *start, struct timeval *end)
|
||||
log(LOG_NOTICE, "tv_udiff(): comparing times too far apart.");
|
||||
return LONG_MAX;
|
||||
}
|
||||
|
||||
/*
|
||||
This is a no-op: "secdiff--" takes 1M from the final result,
|
||||
and "end_usec+=100000L" puts it back.
|
||||
if (end_usec < start->tv_usec) {
|
||||
secdiff--;
|
||||
end_usec += 1000000L;
|
||||
}
|
||||
*/
|
||||
udiff = secdiff*1000000L + (end_usec - start->tv_usec);
|
||||
if(udiff < 0) {
|
||||
log(LOG_NOTICE, "tv_udiff(): start is after end. Returning 0.");
|
||||
|
Loading…
Reference in New Issue
Block a user