diff options
author | Mike Yu <yumike@google.com> | 2020-02-10 21:11:05 +0800 |
---|---|---|
committer | Mike Yu <yumike@google.com> | 2020-02-20 17:30:57 +0800 |
commit | 6407ae47fcaf8e00ac32f7fd9e65860952eeb3aa (patch) | |
tree | 6c821bef26300da50eda1cb9d1f04598651a4207 /stats.h | |
parent | c573a3d76a3ace472353e6620a91a4b8b54cb0f8 (diff) | |
download | DnsResolver-6407ae47fcaf8e00ac32f7fd9e65860952eeb3aa.tar.gz |
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
Diffstat (limited to 'stats.h')
-rw-r--r-- | stats.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |