Overview
Comment: | OFThread: Use unsigned int instead of useconds_t
useconds_t isn't always available and an unsigned int always satisfies |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8e84561642fea5b896de97dc763a4f31 |
User & Date: | js on 2017-05-17 22:07:03 |
Other Links: | manifest | tags |
Context
2017-05-17
| ||
22:14 | typedef socklen_t to int on MorphOS check-in: d302df8b46 user: js tags: trunk | |
22:07 | OFThread: Use unsigned int instead of useconds_t check-in: 8e84561642 user: js tags: trunk | |
20:31 | configure: Better poll() and select() checks check-in: a29197bd35 user: js tags: trunk | |
Changes
Modified src/OFThread.m from [666629e8be] to [3b9d6bd50a].
︙ | ︙ | |||
83 84 85 86 87 88 89 | #ifdef OF_HAVE_ATOMIC_OPS # import "atomic.h" #endif #ifdef __DJGPP__ # define lrint(x) rint(x) | < | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #ifdef OF_HAVE_ATOMIC_OPS # import "atomic.h" #endif #ifdef __DJGPP__ # define lrint(x) rint(x) #endif #ifdef OF_HAVE_THREADS # import "threading.h" static of_tlskey_t threadSelfKey; static OFThread *mainThread; |
︙ | ︙ | |||
213 214 215 216 217 218 219 | svcSleepThread((int64_t)(timeInterval * 1000000000)); #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval); | | | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | svcSleepThread((int64_t)(timeInterval * 1000000000)); #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval); usleep((unsigned int)lrint( (timeInterval - floor(timeInterval)) * 1000000)); #endif } + (void)sleepUntilDate: (OFDate *)date { [self sleepForTimeInterval: [date timeIntervalSinceNow]]; |
︙ | ︙ |