On 19-Nov-23 13:01, Cristian Rodríguez via curl-library wrote:
While I agree that a struct timespec* would be a better choice, consistency in an API is important.On Sat, Nov 18, 2023 at 11:05 AM Daniel Stenberg via curl-library <curl-library@lists.haxx.se> wrote:On Sat, 18 Nov 2023, Yifei Kong via curl-library wrote: > However, there is only `CURLOPT_SERVER_RESPONSE_TIMEOUT` and no > `CURLOPT_SERVER_RESPONSE_TIMEOUT_MS`, is it possible to add this option? It would probably make a lot of sense, yes! -- strongly suggest it is a function that takes a struct timespec instead.
All the other _MS functions could also use a stuct timespec (you get nanoseconds).
Perhaps a (CURLOPT_PRECISE_TIMEOUT, {CURLOPT_SERVER_RESPONSE_TIMEOUT, ...}, struct timespec*)?
This would reduce the CURLOPT namespace intrusion...One could also include an enum to specify that the reference is to a timespec (vs. some future picosecond structure, or even integer seconds, usec (struct timeval *), jiffies - or whatever else the future brings.)
Timothe Litt ACM Distinguished Engineer -------------------------- This communication may not represent the ACM or my employer's views, if any, on the matters discussed.
OpenPGP_signature.asc
Description: OpenPGP digital signature
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html