Use getmicrotime() instead of microtime() when timestamping ICMP packets,
the former is quicker and accurate enough for use here. Submitted by: Jason Slagle <raistlin@toledolink.com> (on IRC) Reviewed by: phk
This commit is contained in:
parent
d96cfeae0c
commit
16cd6db04f
|
@ -774,7 +774,7 @@ iptime()
|
|||
struct timeval atv;
|
||||
u_long t;
|
||||
|
||||
microtime(&atv);
|
||||
getmicrotime(&atv);
|
||||
t = (atv.tv_sec % (24*60*60)) * 1000 + atv.tv_usec / 1000;
|
||||
return (htonl(t));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue