26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
+
+
+
+
+
+
|
#ifdef OF_HAVE_SCHED_YIELD
# include <sched.h>
#endif
#include "unistd_wrapper.h"
#include "platform.h"
#if defined(OF_MORPHOS) && !defined(OF_IXEMUL)
# define BOOL EXEC_BOOL
# include <proto/dos.h>
# undef BOOL
#endif
#ifdef OF_WII
# define BOOL OGC_BOOL
# define nanosleep ogc_nanosleep
# include <ogcsys.h>
# undef BOOL
# undef nanosleep
|
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
+
+
+
+
+
|
rqtp.tv_sec = (time_t)timeInterval;
rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000);
if (rqtp.tv_sec != floor(timeInterval))
@throw [OFOutOfRangeException exception];
nanosleep(&rqtp, NULL);
#elif defined(OF_MORPHOS) && !defined(OF_IXEMUL)
if (timeInterval * 50 > ULONG_MAX)
@throw [OFOutOfRangeException exception];
Delay(timeInterval * 50);
#elif defined(OF_NINTENDO_DS)
uint64_t counter;
if (timeInterval > UINT64_MAX / 60)
@throw [OFOutOfRangeException exception];
counter = timeInterval * 60;
|