Simplify timing gymnastics a bit.
This commit is contained in:
parent
dda13ca0ef
commit
58d120f6d3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124810
@ -604,13 +604,13 @@ cisco_send(sc_p sc, int type, long par1, long par2)
|
||||
int error = 0;
|
||||
struct timeval time;
|
||||
|
||||
getmicrotime(&time);
|
||||
getmicrouptime(&time);
|
||||
|
||||
MGETHDR(m, M_DONTWAIT, MT_DATA);
|
||||
if (!m)
|
||||
return (ENOBUFS);
|
||||
|
||||
t = (time.tv_sec - boottime.tv_sec) * 1000;
|
||||
t = time.tv_sec * 1000 + time.tv_usec / 1000;
|
||||
m->m_pkthdr.len = m->m_len = CISCO_HEADER_LEN + CISCO_PACKET_LEN;
|
||||
m->m_pkthdr.rcvif = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user