2 * <time.h> wrapper functions.
5 * Jonathan Pryor (jonpryor@vt.edu)
7 * Copyright (C) 2004 Jonathan Pryor
20 #if defined(HAVE_STRUCT_TIMESPEC) && _POSIX_C_SOURCE >= 199309L
22 Mono_Posix_Syscall_nanosleep (struct Mono_Posix_Timespec
*req
,
23 struct Mono_Posix_Timespec
*rem
)
25 struct timespec _req
, _rem
, *prem
= NULL
;
33 if (Mono_Posix_FromTimespec (req
, &_req
) == -1)
37 if (Mono_Posix_FromTimespec (rem
, &_rem
) == -1)
42 r
= nanosleep (&_req
, prem
);
44 if (rem
&& Mono_Posix_ToTimespec (prem
, rem
) == -1)
53 Mono_Posix_Syscall_stime (mph_time_t
*t
)
60 mph_return_if_time_t_overflow (*t
);
64 #endif /* ndef HAVE_STIME */
67 Mono_Posix_Syscall_time (mph_time_t
*t
)
75 mph_return_if_time_t_overflow (*t
);