MEDIUM: tree-wide: replace timeval with nanoseconds in tv_accept and tv_request
Let's get rid of timeval in storage of internal timestamps so that they
are no longer mistaken for wall clock time. These were exclusively used
subtracted from each other or to/from "now" after being converted to ns,
so this patch removes the tv_to_ns() conversion to use them natively. Two
occurrences of tv_isge() were turned to a regular wrapping subtract.
diff --git a/src/http_act.c b/src/http_act.c
index 596e68c..07997fa 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -1284,7 +1284,7 @@
goto fail;
/* Note: Only eval on the request */
- s->logs.tv_request = now;
+ s->logs.request_ts = tv_to_ns(&now);
req->analysers &= AN_REQ_FLT_END;
if (s->sess->fe == s->be) /* report it if the request was intercepted by the frontend */
@@ -2279,7 +2279,7 @@
if (rule->from == ACT_F_HTTP_REQ) {
/* let's log the request time */
- s->logs.tv_request = now;
+ s->logs.request_ts = tv_to_ns(&now);
req->analysers &= AN_REQ_FLT_END;
if (s->sess->fe == s->be) /* report it if the request was intercepted by the frontend */