From 6407ae47fcaf8e00ac32f7fd9e65860952eeb3aa Mon Sep 17 00:00:00 2001 From: Mike Yu Date: Mon, 10 Feb 2020 21:11:05 +0800 Subject: Move the legacy stats function declarations out of resolv_private.h No functionality changes. Bug: 137169582 Test: cd packages/modules/DnsResolver && mm Change-Id: I2aa236f8f3de1582cae820d761295d388b6baee7 --- stats.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'stats.h') diff --git a/stats.h b/stats.h index cc7de9f5..698c8c29 100644 --- a/stats.h +++ b/stats.h @@ -55,3 +55,9 @@ int android_net_res_stats_get_info_for_net(unsigned netid, int* nscount, // Returns an array of bools indicating which servers are considered good int android_net_res_stats_get_usable_servers(const res_params* params, res_stats stats[], int nscount, bool valid_servers[]); + +// Calculate the round-trip-time from start time t0 and end time t1. +int res_stats_calculate_rtt(const timespec* t1, const timespec* t0); + +// Create a sample for calculating server reachability statistics. +void res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt); -- cgit v1.2.3