lsquic_rtt.h revision 229fce07
1229fce07SDmitri Tikhonov/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc. See LICENSE. */ 250aadb33SDmitri Tikhonov/* 350aadb33SDmitri Tikhonov * lsquic_rtt.h -- RTT calculation 450aadb33SDmitri Tikhonov */ 550aadb33SDmitri Tikhonov 650aadb33SDmitri Tikhonov#ifndef LSQUIC_RTT_H 750aadb33SDmitri Tikhonov#define LSQUIC_RTT_H 1 850aadb33SDmitri Tikhonov 950aadb33SDmitri Tikhonov 1050aadb33SDmitri Tikhonov/* This struct is initialized by setting it to zero */ 1150aadb33SDmitri Tikhonovstruct lsquic_rtt_stats { 1250aadb33SDmitri Tikhonov lsquic_time_t srtt; 1350aadb33SDmitri Tikhonov lsquic_time_t rttvar; 1450aadb33SDmitri Tikhonov}; 1550aadb33SDmitri Tikhonov 1650aadb33SDmitri Tikhonov 1750aadb33SDmitri Tikhonovvoid 1850aadb33SDmitri Tikhonovlsquic_rtt_stats_update (struct lsquic_rtt_stats *, lsquic_time_t send_delta, 1950aadb33SDmitri Tikhonov lsquic_time_t lack_delta); 2050aadb33SDmitri Tikhonov 2150aadb33SDmitri Tikhonov 2250aadb33SDmitri Tikhonov#define lsquic_rtt_stats_get_srtt(stats) ((stats)->srtt) 2350aadb33SDmitri Tikhonov 2450aadb33SDmitri Tikhonov#define lsquic_rtt_stats_get_rttvar(stats) ((stats)->rttvar) 2550aadb33SDmitri Tikhonov 2650aadb33SDmitri Tikhonov#endif 27