1000000 usec -> 1 sec 0 usec; fix.

This commit is contained in:
Philippe Charnier 2000-03-26 14:44:34 +00:00
parent a917a42da5
commit 694f3216ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58614
2 changed files with 3 additions and 3 deletions

View File

@ -532,7 +532,7 @@ main(argc, argv)
gettimeofday(&curtime, NULL);
difftime.tv_sec = curtime.tv_sec - lasttime.tv_sec;
difftime.tv_usec += curtime.tv_usec - lasttime.tv_usec;
while (difftime.tv_usec > 1000000) {
while (difftime.tv_usec >= 1000000) {
difftime.tv_sec++;
difftime.tv_usec -= 1000000;
}

View File

@ -1955,7 +1955,7 @@ stat_line(r, s, have_next, rst)
v_out = ntohl(s->tr_vifin) - ntohl(r->tr_vifin);
v_pps = v_out / timediff;
whochar = 'v';
/* Fall through */
/* FALLTHROUGH */
case OUTS:
if (tunstats)
@ -2005,7 +2005,7 @@ stat_line(r, s, have_next, rst)
g_out = ntohl(s->tr_pktcnt) - ntohl(r->tr_pktcnt);
g_pps = g_out / timediff;
whochar = 'v';
/* Fall through */
/* FALLTHROUGH */
#endif
case OUTS: