Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 8105:4983357258d7 quic
QUIC: a bandaid for calculating ack_delay with non-monotonic time.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 01 Oct 2020 12:10:37 +0100 |
parents | 9588a2782c62 |
children | 3bde57a0e6ce |
comparison
equal
deleted
inserted
replaced
8104:9588a2782c62 | 8105:4983357258d7 |
---|---|
2263 | 2263 |
2264 if (level == ssl_encryption_application) { | 2264 if (level == ssl_encryption_application) { |
2265 ngx_gettimeofday(&tv); | 2265 ngx_gettimeofday(&tv); |
2266 ack_delay = (tv.tv_sec - received->tv_sec) * 1000000 | 2266 ack_delay = (tv.tv_sec - received->tv_sec) * 1000000 |
2267 + tv.tv_usec - received->tv_usec; | 2267 + tv.tv_usec - received->tv_usec; |
2268 ack_delay = ngx_max(ack_delay, 0); | |
2268 ack_delay >>= c->quic->ctp.ack_delay_exponent; | 2269 ack_delay >>= c->quic->ctp.ack_delay_exponent; |
2269 } | 2270 } |
2270 | 2271 |
2271 return ack_delay; | 2272 return ack_delay; |
2272 } | 2273 } |