[Swan-dev] hi resolution time in log file
Andrew Cagney
andrew.cagney at gmail.com
Fri Oct 27 14:36:31 UTC 2017
I noticed that the timestamp added to log files has only a 1 second
resolution; this isn't much help when multiple events get processed per
second. The reason is a combination time() (1 second resolution) and
strftime() (doesn't do sub-second resolution anyway). I suspect all this
pre-dates git history.
Anyway, I'm looking at an alternative. My thought is a combination of
gettimeofday() or event_base_gettimeofday_cached() (the latter would peg
our times to when the event fired I believe which may not be such a good
idea, otoh it is cheap) and strftime() + printf(). Any thoughts.
Andrew
PS: I'm also left wondering why delta time isn't a double, would make
specifying sub-second timers a lot easier (i.e., 0.5)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20171027/7318e18b/attachment.html>
More information about the Swan-dev
mailing list