return strtoull(s, NULL, 0);
}
-long long usec_time_diff(struct timeval *larget, struct timeval *smallt)
+int64_t usec_time_diff(struct timeval *larget, struct timeval *smallt)
{
- long long sec_diff = larget->tv_sec - smallt->tv_sec;
- return (sec_diff * 1000000) + (long long)(larget->tv_usec - smallt->tv_usec);
+ int64_t sec_diff = larget->tv_sec - smallt->tv_sec;
+ return (sec_diff * 1000000) + (int64_t)(larget->tv_usec - smallt->tv_usec);
}
}
if (torture_showall || res != denytable1[i].result) {
- long long tdif;
+ int64_t tdif;
GetTimeOfDay(&tv);
tdif = usec_time_diff(&tv, &tv_start);
tdif /= 1000;
}
if (torture_showall || res != denytable2[i].result) {
- long long tdif;
+ int64_t tdif;
GetTimeOfDay(&tv);
tdif = usec_time_diff(&tv, &tv_start);
tdif /= 1000;
GetTimeOfDay(&tv_end);
if (NT_STATUS_EQUAL(cli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION)) {
/* Sharing violation errors need to be 1 second apart. */
- long long tdif = usec_time_diff(&tv_end, &tv_start);
+ int64_t tdif = usec_time_diff(&tv_end, &tv_start);
if (tdif < 500000 || tdif > 1500000) {
fprintf(stderr,"Timing incorrect %lld.%lld for share violation\n",
- tdif / (long long)1000000,
- tdif % (long long)1000000);
+ tdif / (int64_t)1000000,
+ tdif % (int64_t)1000000);
}
}
} while (NT_STATUS_EQUAL(cli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION));