On Thursday 30 June 2016 11:00:01 Daniel Stenberg wrote:
> On Thu, 30 Jun 2016, Tim Ruehsen wrote:
> > Just tried curl with '--trace log --trace-time' and capturing the session
> > with wireshark. The times given by curl and the ones given by wireshark
> > differ by ~466ms. I am used to see differences of a few microseconds...
> > but
> > half a second ?
> > 
> > Can anyone reproduce that ?
> 
> Never tried it, but curl gets its time stamp from exactly when the
> debug callback is called, which of course may differ from when wireshark
> captures the packet.
> 
> Are you saying they always differ with the same amount (466ms) of time?
> 
> Note that curl shows the "wall clock" number of microseconds, they're not
> relative to the start time. The seconds field is relative to the first
> second it gets logged:
> https://github.com/curl/curl/blob/master/src/tool_cb_dbg.c#L61

Curl is using CLOCK_MONOTONIC for the milliseconds while wireshark (and all 
other tools I know of) use CLOCK_REALTIME. I just changed it in 
tool_util.c/tool_tvnow() and now curl and wireshark are in sync and easily 
comparable/searchable.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to