@@ -8,10 +8,16 @@ * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #include "config.h" + +#ifndef _WIN32 +# include +#else +# include +#endif #import "OFThread.h" #import "OFList.h" #import "OFAutoreleasePool.h" #import "OFExceptions.h" @@ -82,10 +88,19 @@ + (OFThread*)currentThread { return of_tlskey_get(thread_self); } + ++ (void)sleepForNMilliseconds: (unsigned int)msecs; +{ +#ifndef _WIN32 + usleep(msecs * 1000); +#else + Sleep(msecs); +#endif +} + (void)terminate { [self terminateWithObject: nil]; }