struct timeval end_time;
struct timeval last_send_time; /* time last ping was sent */
struct timeval next_report_time; /* time next -Q report is expected */
-struct timezone tz;
/* switches */
int generate_flag = 0; /* flag for IP list generation */
signal(SIGINT, finish);
- gettimeofday(&start_time, &tz);
+ gettimeofday(&start_time, NULL);
current_time = start_time;
if (report_interval) {
; /* process other replies in the queue */
}
- gettimeofday(¤t_time, &tz);
+ gettimeofday(¤t_time, NULL);
/* Print report */
if (report_interval && (loop_flag || count_flag) && (timeval_diff(¤t_time, &next_report_time) >= 0)) {
int i;
HOST_ENTRY* h;
- gettimeofday(&end_time, &tz);
+ gettimeofday(&end_time, NULL);
/* tot up unreachables */
for (i = 0; i < num_hosts; i++) {
if (verbose_flag || per_recv_flag)
fprintf(stderr, "\n");
- gettimeofday(¤t_time, &tz);
+ gettimeofday(¤t_time, NULL);
curr_tm = localtime((time_t*)¤t_time.tv_sec);
fprintf(stderr, "[%2.2d:%2.2d:%2.2d]\n", curr_tm->tm_hour,
curr_tm->tm_min, curr_tm->tm_sec);
int myseq;
int ret = 1;
- gettimeofday(&h->last_send_time, &tz);
+ gettimeofday(&h->last_send_time, NULL);
myseq = seqmap_add(h->i, h->num_sent, &h->last_send_time);
#if defined(DEBUG) || defined(_DEBUG)
return 1;
}
- gettimeofday(¤t_time, &tz);
+ gettimeofday(¤t_time, NULL);
/* Process ICMP packet and retrieve id/seq */
if (response_addr.ss_family == AF_INET) {