int this_time;
clock_gettime_mono(&tp_end);
- this_time = nsec_time_diff(&tp_start,&tp_end)/1000000;
+ this_time = nsec_time_diff(&tp_end,&tp_start)/1000000;
get_total_time_ms += this_time;
get_total_size += nread;
int this_time;
clock_gettime_mono(&tp_end);
- this_time = nsec_time_diff(&tp_start,&tp_end)/1000000;
+ this_time = nsec_time_diff(&tp_end,&tp_start)/1000000;
put_total_time_ms += this_time;
put_total_size += state.nread;
while (1) {
struct timespec tp2;
clock_gettime_mono(&tp2);
- if (nsec_time_diff(&tp,&tp2)/1000000 > retry_time) {
+ if (nsec_time_diff(&tp2,&tp)/1000000 > retry_time) {
if (!retries)
break;
if (!found && !send_packet(&p))
struct timespec tp2;
clock_gettime_mono(&tp2);
- if (nsec_time_diff(&tp,&tp2)/1000000 > retry_time) {
+ if (nsec_time_diff(&tp2,&tp)/1000000 > retry_time) {
if (!retries)
break;
if (!found && !send_packet(&p))