X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bfb8d7685e998fbcafcb5315b3c50a77760b7e48..53c1823aaef2eb8d547a8eed8cfe12fe7204ca79:/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp b/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp index 9ed50756..fb7d2cc5 100644 --- a/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp +++ b/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp @@ -148,7 +148,8 @@ if (portU && !stoppedUDP) CloseUDP(); for (int i = 0; i < 25 && !stoppedUDP; ++i) { - usleep(200000); + struct timespec ts = {0, 200000000}; + nanosleep(&ts, NULL); } if (stoppedUDP) { @@ -170,7 +171,8 @@ if (portT && !stoppedTCP) CloseTCP(); for (int i = 0; i < 25 && !stoppedTCP; ++i) { - usleep(200000); + struct timespec ts = {0, 200000000}; + nanosleep(&ts, NULL); } if (stoppedTCP) {