Files
ft_ping/includes/utils.h

33 lines
587 B
C

#pragma once
#include <ping.h>
#include <sys/types.h>
void append_time(double time);
/**
* @brief Can be used to get the avarage rtt
*/
double get_avg_rtt(void);
/**
* @brief Can be used to get the min rtt
*/
double get_min_rtt(void);
/**
* @brief Can be used to get the max rtt
*/
double get_max_rtt(void);
/**
* @brief Can be used to get the stddev rtt
*/
double get_stddev_rtt(void);
/**
* @brief Can be used to check if the timeout in passed
*/
bool check_for_timeout(struct timeval start, options_t opt);
void print_stats(void);
bool check_for_count(options_t opt);