fix: Remove Linux-ism in clock_gettime(3). (#853)
Fixes build on FreeBSD. Possible fix for #829.
Этот коммит содержится в:
родитель
40e7c05440
Коммит
8b9c59b3ec
@ -40,7 +40,7 @@ iperf_time_now(struct iperf_time *time1)
|
|||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
int result;
|
int result;
|
||||||
result = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
result = clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
time1->secs = (uint32_t) ts.tv_sec;
|
time1->secs = (uint32_t) ts.tv_sec;
|
||||||
time1->usecs = (uint32_t) ts.tv_nsec / 1000;
|
time1->usecs = (uint32_t) ts.tv_nsec / 1000;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user