diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-07-29 20:18:14 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-07 16:50:51 +0200 |
commit | 49ae3fd3edb957a8a2f7c7541c66b9336f25176e (patch) | |
tree | f77ceb37f996983fde3c2dc8811e201eaf634c02 /src | |
parent | 59c9094781cbf340f11929d497c1465cf45cf90a (diff) |
Use portable dUsleep() instead of usleep()
Reviewed-by: dogma
Diffstat (limited to 'src')
-rw-r--r-- | src/IO/dpi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/IO/dpi.c b/src/IO/dpi.c index c1786de6..46ddc49e 100644 --- a/src/IO/dpi.c +++ b/src/IO/dpi.c @@ -39,6 +39,7 @@ #include "IO.h" #include "Url.h" #include "../../dpip/dpip.h" +#include "dlib/dlib.h" /* This one is tricky, some sources state it should include the byte * for the terminating NULL, and others say it shouldn't. */ @@ -504,12 +505,12 @@ static int Dpi_check_dpid(int num_tries) static int Dpi_blocking_start_dpid(void) { int cst, try = 0, - n_tries = 3; /* 3 seconds */ + n_tries = 12; /* 3 seconds */ /* test the dpid, and wait a bit for it to start if necessary */ while ((cst = Dpi_check_dpid(n_tries)) == 1) { MSG("Dpi_blocking_start_dpid: try %d\n", ++try); - sleep(1); + dUsleep(250000UL); } return cst; } |