[Winpcap-users] Application to application delay

Ben Greear greearb at candelatech.com
Fri Dec 1 20:26:28 GMT 2006


Antonio Ocampo wrote:
> Thanks for the explanation Guy. I'm trying to calculate application to 
> application delay. At the moment i have written this piece of code:
>  
> header_time=localtime(&header->ts.tv_sec);
> strftime( timestr, sizeof timestr, "%H:%M:%S", header_time);
> fprintf(buffer,"%d %s.%.6d\n",num_packet,timestr,header->ts.tv_usec);
>  
> but it only gives me the timestamp put by the kernel. Not what I want :(

Get the current time-stamp as reported by Windows.  There are several
nasty and error-prone ways to do this on Windows, but you can find them
in google.  On Linux, just use gettimeofday.

Ben

>  
> Please help me!!
>  
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Winpcap-users mailing list