1.3beta and SDK 4 compile error - usleep was not declared in this scope
by Johnny Vo · in iTorque 2D · 06/22/2010 (11:19 pm) · 5 replies
I get one error when trying to build a 1.3beta project with SDK4 - usleep was not declared in this scope.
I'm not proficient with objective C. Anyone know how I can fix this?
usleep is from this method.
/// Asks the operating system to put the process to sleep for at least ms milliseconds
void Platform::sleep(U32 ms)
{
// note: this will overflow if you want to sleep for more than 49 days. just so ye know.
// -Mat Need to fix this
usleep( ms * 1000 );
}
I'm not proficient with objective C. Anyone know how I can fix this?
usleep is from this method.
/// Asks the operating system to put the process to sleep for at least ms milliseconds
void Platform::sleep(U32 ms)
{
// note: this will overflow if you want to sleep for more than 49 days. just so ye know.
// -Mat Need to fix this
usleep( ms * 1000 );
}
About the author
Enlevel - Programmer. Games released with iT2D: Are You Quick Enough?, Coloring 4 Kids, Twistum
#2
07/09/2010 (11:38 am)
Thanks Johnny - just hit the same problem - decided to move my stuff over now the RC is out.
#3
07/09/2010 (3:15 pm)
No problem, Scott. Are you moving IWT or a new game?
#4
www.torquepowered.com/community/blogs/view/18377
www.slideshare.net/llopis/squeezing-every-drop-of-performance-out-of-the-iphone frame 119 onwards
07/09/2010 (4:52 pm)
Moving iWT over. I'm interested in this CADisplayLink stuff:www.torquepowered.com/community/blogs/view/18377
www.slideshare.net/llopis/squeezing-every-drop-of-performance-out-of-the-iphone frame 119 onwards
#5
07/09/2010 (6:15 pm)
OKay, got it all working and can see no difference in smoothness or performance on 3G or 3GS :( 3G if anything seems to be worse.
Torque Owner Johnny Vo
Included #include <unistd.h> in iphonetime.mm.