开发者

Millisecond sleep in C on iOS4

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜