os/time: Fix warnings on C++

This commit is contained in:
Jakob Bornecrantz 2020-04-16 13:22:57 +01:00
parent 76f83364e3
commit 48957b97c2

View file

@ -63,11 +63,9 @@ static inline void
os_nanosleep(long nsec) os_nanosleep(long nsec)
{ {
#ifdef XRT_OS_LINUX #ifdef XRT_OS_LINUX
struct timespec spec = { struct timespec spec;
.tv_sec = 0, spec.tv_sec = 0;
.tv_nsec = nsec, spec.tv_nsec = nsec, nanosleep(&spec, NULL);
};
nanosleep(&spec, NULL);
#endif #endif
} }