mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +00:00
os/time: Fix warnings on C++
This commit is contained in:
parent
76f83364e3
commit
48957b97c2
|
@ -63,11 +63,9 @@ static inline void
|
|||
os_nanosleep(long nsec)
|
||||
{
|
||||
#ifdef XRT_OS_LINUX
|
||||
struct timespec spec = {
|
||||
.tv_sec = 0,
|
||||
.tv_nsec = nsec,
|
||||
};
|
||||
nanosleep(&spec, NULL);
|
||||
struct timespec spec;
|
||||
spec.tv_sec = 0;
|
||||
spec.tv_nsec = nsec, nanosleep(&spec, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue