View Single Post
  #4  
Old 11-13-2009, 11:20 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Okay I'm seeing what you're saying.

Code:
void Sleep(unsigned int x) {
        if (x <= 0  )
                return;
        if ( x>=1000 )
                usleep(999999);
        else
                usleep(x*1000);
}
Would be the implementation I'd use though, slightly faster due to no recursion and the functionality isn't... odd.
Reply With Quote