WHAT'S NEW?
+ V0.81 Fix for https://bugs.launchpad.net/mtr/+bug/776211
+ don't have time right now to integrate some submitted patches.
+ Sorry.
V0.80 Some compilation fixes for BSD by Jeremy Chadwick
<freebsd@jdc.parodius.com>
V0.78/0.79 some compilation fixes for BSD&others by
int display_offset = 0;
+#define GRACETIME (5 * 1000*1000)
+
void select_loop(void) {
fd_set readfd;
int anyset = 0;
int NumPing = 0;
int paused = 0;
struct timeval lasttime, thistime, selecttime;
+ struct timeval startgrace, stopgrace;
int dt;
int rv;
+ int graceperiod = 0;
+
gettimeofday(&lasttime, NULL);
selecttime.tv_usec = 0;
rv = select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
-
} else {
if(Interactive) display_redraw();
(thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
lasttime = thistime;
- if(NumPing >= MaxPing && (!Interactive || ForceMaxPing))
- return;
- if (net_send_batch())
- NumPing++;
+ if (!graceperiod) {
+ if(NumPing >= MaxPing && (!Interactive || ForceMaxPing)) {
+ graceperiod=1;
+ startgrace=thistime;
+ //gettimeofday (&startgrace, NULL);
+ }
+ if (net_send_batch())
+ NumPing++;
+ }
+ }
+ if (graceperiod) {
+ // gettimeofday(&thistime, NULL);
+ dt = (thistime.tv_usec - startgrace.tv_usec) +
+ 1000000 * (thistime.tv_sec - startgrace.tv_sec);
+ if (dt > GRACETIME) return;
}
selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);