Differences From Artifact [426c027f93]:
- File
src/OFThread.m
— part of check-in
[71d45a29d1]
at
2013-04-26 20:40:43
on branch trunk
— Make sure +[OFThread sleep*] is always available.
This means that even if --disable-threads has been specified, it is
possible to use +[OFThread sleep*] to sleep the current (and only)
thread. (user: js, size: 7825) [annotate] [blame] [check-ins using]
To Artifact [64480ed795]:
- File src/OFThread.m — part of check-in [db70226153] at 2013-04-26 21:10:50 on branch trunk — Use nanosleep() if available. (user: js, size: 7789) [annotate] [blame] [check-ins using]
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + | #define OF_THREAD_M #define __NO_EXT_QNX #include <stdlib.h> #include <math.h> #include <time.h> #ifndef _WIN32 # include <unistd.h> #endif #ifdef OF_HAVE_SCHED_YIELD # include <sched.h> |
︙ | |||
180 181 182 183 184 185 186 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | + + - + + + + + + + + + - + - + - - - - - - - - - - - - - | #endif + (void)sleepForTimeInterval: (double)seconds { if (seconds < 0) @throw [OFOutOfRangeException exceptionWithClass: self]; #if defined(HAVE_NANOSLEEP) struct timespec rqtp; |
︙ |