X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/4931ba9476c58923e2f9020bce6bc1a7ca40aaed..3b856e83ad55125111fe5961d07d7524bd6ee283:/stglibs/ia.lib/ia.cpp diff --git a/stglibs/ia.lib/ia.cpp b/stglibs/ia.lib/ia.cpp index 9883dbbb..81bd75fb 100644 --- a/stglibs/ia.lib/ia.cpp +++ b/stglibs/ia.lib/ia.cpp @@ -63,13 +63,17 @@ #include void * RunL(void * data) { +sigset_t signalSet; +sigfillset(&signalSet); +pthread_sigmask(SIG_BLOCK, &signalSet, NULL); + IA_CLIENT_PROT * c = (IA_CLIENT_PROT *)data; static int a = 0; if (a == 0) { - usleep(50000); + Sleep(50); a = 1; } @@ -82,7 +86,9 @@ return NULL; //--------------------------------------------------------------------------- void Sleep(int ms) { -usleep(ms * 1000); +long long res = ms * 1000000; +struct timespec ts = {res / 1000000000, res % 1000000000}; +nanosleep(&ts, NULL); } //--------------------------------------------------------------------------- long GetTickCount()