Results 1 to 2 of 2
How can i get the time took to ping a server
something like
struct ping_result
{
min_time;
avg_time;
max_time;
}
struct ping_result result;
ping( char * server , char *opt ...
- 11-13-2008 #1Just Joined!
- Join Date
- Jul 2008
- Posts
- 22
ping time
How can i get the time took to ping a server
something like
struct ping_result
{
min_time;
avg_time;
max_time;
}
struct ping_result result;
ping( char * server , char *opt , &result);
- 11-18-2008 #2Just Joined!
- Join Date
- Nov 2008
- Posts
- 26
One way would be to use the system() function to execute ping with a redirect to a file. (Don't forget that you'll need to tell ping how many attempts to make [man ping]). Then open the file, and read the results. Build your structure and do whatever with it.


Reply With Quote