version 1.306, 2017/10/23 05:08:00 |
version 1.307, 2017/11/25 05:58:47 |
|
|
} |
} |
|
|
/* |
/* |
* Returns current time in seconds from Jan 1, 1970 with the maximum |
|
* available resolution. |
|
*/ |
|
|
|
static double |
|
get_current_time(void) |
|
{ |
|
struct timeval tv; |
|
gettimeofday(&tv, NULL); |
|
return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0; |
|
} |
|
|
|
/* |
|
* Sets control_persist_exit_time to the absolute time when the |
* Sets control_persist_exit_time to the absolute time when the |
* backgrounded control master should exit due to expiry of the |
* backgrounded control master should exit due to expiry of the |
* ControlPersist timeout. Sets it to 0 if we are not a backgrounded |
* ControlPersist timeout. Sets it to 0 if we are not a backgrounded |
|
|
fatal("%s pledge(): %s", __func__, strerror(errno)); |
fatal("%s pledge(): %s", __func__, strerror(errno)); |
} |
} |
|
|
start_time = get_current_time(); |
start_time = monotime_double(); |
|
|
/* Initialize variables. */ |
/* Initialize variables. */ |
last_was_cr = 1; |
last_was_cr = 1; |
|
|
buffer_free(&stderr_buffer); |
buffer_free(&stderr_buffer); |
|
|
/* Report bytes transferred, and transfer rates. */ |
/* Report bytes transferred, and transfer rates. */ |
total_time = get_current_time() - start_time; |
total_time = monotime_double() - start_time; |
packet_get_bytes(&ibytes, &obytes); |
packet_get_bytes(&ibytes, &obytes); |
verbose("Transferred: sent %llu, received %llu bytes, in %.1f seconds", |
verbose("Transferred: sent %llu, received %llu bytes, in %.1f seconds", |
(unsigned long long)obytes, (unsigned long long)ibytes, total_time); |
(unsigned long long)obytes, (unsigned long long)ibytes, total_time); |