开发者

Millisecond sleep in C on iOS4

开发者 https://www.devze.com 2023-01-20 12:59 出处:网络
Im trying to sleep for a specified amount of millisecond in C on iphone but I keep getting some complaints on the console:

Im trying to sleep for a specified amount of millisecond in C on iphone but I keep getting some complaints on the console:

Detected an attempt to call a symbol in system libraries that is not present on the iPhone: nanosleep$UNIX2003 called from function ...

Detected an attempt to call a symbol in 开发者_如何学Csystem libraries that is not present on the iPhone: usleep$UNIX2003 called from function ...

Detected an attempt to call a symbol in system libraries that is not present on the iPhone: select$UNIX2003 called from function ...

If usleep, nanosleep and select a not available how can I sleep for ? milliseconds in C on iOS4???

Im running out of ideas here...

Tks in advance,


Use usleep(10000) (1/100th second) if you must, however keep it for background threads / unit tests / judicious use...


you shouldn't sleep on the main thread. for a secondary thread, use a timer, notification, operation, or pthread interfaces.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号