curl/lib/vquic
Stefan Eissing 2de22a00c7
lib: keep timestamp in easy handle
Use `data->progress.now` as the timestamp of proecssing a transfer.
Update it on significant events and refrain from calling `curlx_now()`
in many places.

The problem this addresses is
a) calling curlx_now() has costs, depending on platform. Calling it
   every time results in 25% increase `./runtest` duration on macOS.
b) we used to pass a `struct curltime *` around to save on calls, but
   when some method directly use `curx_now()` and some use the passed
   pointer, the transfer experienes non-linear time. This results in
   timeline checks to report events in the wrong order.

By keeping a timestamp in the easy handle and updating it there, no
longer invoking `curlx_now()` in the "lower" methods, the transfer
can observer a steady clock progression.

Add documentation in docs/internals/TIME-KEEPING.md

Reported-by: Viktor Szakats
Fixes #19935
Closes #19961
2025-12-16 08:48:44 +01:00
..
curl_ngtcp2.c lib: keep timestamp in easy handle 2025-12-16 08:48:44 +01:00
curl_ngtcp2.h ngtcp2: remove the unused Curl_conn_is_ngtcp2 function 2025-11-27 16:00:20 +01:00
curl_osslq.c lib: keep timestamp in easy handle 2025-12-16 08:48:44 +01:00
curl_osslq.h build: fix build errors/warnings in rare configurations 2025-07-23 22:17:03 +02:00
curl_quiche.c lib: keep timestamp in easy handle 2025-12-16 08:48:44 +01:00
curl_quiche.h build: fix build errors/warnings in rare configurations 2025-07-23 22:17:03 +02:00
vquic-tls.c tidy-up: one more round of formatting nits 2025-12-04 19:30:59 +01:00
vquic-tls.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
vquic.c lib: keep timestamp in easy handle 2025-12-16 08:48:44 +01:00
vquic.h tidy-up: miscellaneous 2025-12-12 04:18:48 +01:00
vquic_int.h lib: keep timestamp in easy handle 2025-12-16 08:48:44 +01:00