On Fri, 27 Oct 2017, Andrew Cagney wrote:

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.

Yes.

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.

No specific advise from me here. Antony might know more about libevent
and using it for timers?

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)

I'm mostly left with a feeling time is overengineered and overly complex
in our code - even if it is theorectically the most correct :P

Paul


_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev

Reply via email to