1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

integrating the existing state of TON Storage / TON Payments / CPS Fift development branches

This commit is contained in:
ton 2020-05-27 22:10:46 +04:00
parent 040df63c98
commit 4e2624459b
153 changed files with 10760 additions and 1695 deletions

23
rldp2/RttStats.h Normal file
View file

@ -0,0 +1,23 @@
#pragma once
#include "td/utils/Time.h"
#include "td/utils/TimedStat.h"
namespace ton {
namespace rldp2 {
struct RttStats {
void on_rtt_sample(double rtt_sample, double ack_delay, td::Timestamp now);
double min_rtt = -1;
double windowed_min_rtt = -1;
double last_rtt = -1;
double smoothed_rtt = -1;
double rtt_var = -1;
td::uint32 rtt_round{0};
private:
td::Timestamp rtt_round_at;
td::TimedStat<td::MinStat<double>> windowed_min_rtt_stat{5, 0};
};
} // namespace rldp2
} // namespace ton