lsquic_rtt.h revision 10c492f0
1/* Copyright (c) 2017 - 2018 LiteSpeed Technologies Inc. See LICENSE. */ 2/* 3 * lsquic_rtt.h -- RTT calculation 4 */ 5 6#ifndef LSQUIC_RTT_H 7#define LSQUIC_RTT_H 1 8 9 10/* This struct is initialized by setting it to zero */ 11struct lsquic_rtt_stats { 12 lsquic_time_t srtt; 13 lsquic_time_t rttvar; 14}; 15 16 17void 18lsquic_rtt_stats_update (struct lsquic_rtt_stats *, lsquic_time_t send_delta, 19 lsquic_time_t lack_delta); 20 21 22#define lsquic_rtt_stats_get_srtt(stats) ((stats)->srtt) 23 24#define lsquic_rtt_stats_get_rttvar(stats) ((stats)->rttvar) 25 26#endif 27