Differences From Artifact [b00f8ab9a5]:
- File
src/OFThread.m
— part of check-in
[d71abc5366]
at
2018-08-17 01:17:14
on branch trunk
— AmigaOS 4: Do not use libauto
libauto loads the libraries too late. (user: js, size: 10559) [annotate] [blame] [check-ins using]
To Artifact [3b2a0f4201]:
- File
src/OFThread.m
— part of check-in
[06255a6aa8]
at
2018-08-19 01:13:36
on branch trunk
— Don't use nanosleep() on Nintendo 3DS
It exists, but it just crashes. (user: js, size: 10559) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
253 254 255 256 257 258 259 260 261 262 263 264 265 266 | return; #if defined(OF_WINDOWS) if (timeInterval * 1000 > UINT_MAX) @throw [OFOutOfRangeException exception]; Sleep((unsigned int)(timeInterval * 1000)); #elif defined(HAVE_NANOSLEEP) struct timespec rqtp; rqtp.tv_sec = (time_t)timeInterval; rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != trunc(timeInterval)) | > > > > > | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | return; #if defined(OF_WINDOWS) if (timeInterval * 1000 > UINT_MAX) @throw [OFOutOfRangeException exception]; Sleep((unsigned int)(timeInterval * 1000)); #elif defined(OF_NINTENDO_3DS) if (timeInterval * 1000000000 > INT64_MAX) @throw [OFOutOfRangeException exception]; svcSleepThread((int64_t)(timeInterval * 1000000000)); #elif defined(HAVE_NANOSLEEP) struct timespec rqtp; rqtp.tv_sec = (time_t)timeInterval; rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != trunc(timeInterval)) |
︙ | ︙ | |||
277 278 279 280 281 282 283 | if (timeInterval > UINT64_MAX / 60) @throw [OFOutOfRangeException exception]; counter = timeInterval * 60; while (counter--) swiWaitForVBlank(); | < < < < < | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | if (timeInterval > UINT64_MAX / 60) @throw [OFOutOfRangeException exception]; counter = timeInterval * 60; while (counter--) swiWaitForVBlank(); #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval); usleep((unsigned int)lrint( (timeInterval - trunc(timeInterval)) * 1000000)); |
︙ | ︙ |