fix: Remove Linux-ism in clock_gettime(3). (#853)
Fixes build on FreeBSD. Possible fix for #829.
This commit is contained in:
parent
40e7c05440
commit
8b9c59b3ec
@ -40,7 +40,7 @@ iperf_time_now(struct iperf_time *time1)
|
||||
{
|
||||
struct timespec ts;
|
||||
int result;
|
||||
result = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
result = clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
if (result == 0) {
|
||||
time1->secs = (uint32_t) ts.tv_sec;
|
||||
time1->usecs = (uint32_t) ts.tv_nsec / 1000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user