From 83f6acf5e7db1b994e32318cbdd9df104786043e Mon Sep 17 00:00:00 2001 From: emanuel Date: Thu, 14 Mar 2024 18:46:57 +0000 Subject: [PATCH] itss_sleep --- src/cam.c | 2 +- src/cpm.c | 2 +- src/denm.c | 2 +- src/evm.c | 2 +- src/infrastructure.c | 2 +- src/saem.c | 2 +- src/vcm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cam.c b/src/cam.c index b5179e4..4beba67 100644 --- a/src/cam.c +++ b/src/cam.c @@ -1239,7 +1239,7 @@ void* ca_service() { nr_oer[0] = 4; // Facilities fi_oer[0] = 4; while (!facilities.exit) { - usleep(1000*50); + itss_usleep(50*1000); if (lightship_check() && facilities.lightship.active) { switch (facilities.mver.defaultv) { diff --git a/src/cpm.c b/src/cpm.c index e204a9c..81b2544 100644 --- a/src/cpm.c +++ b/src/cpm.c @@ -744,7 +744,7 @@ void *cp_service(){ is_radar_connected = radar_connection(RADAR_PORT); while(!facilities.exit){ - usleep(1000*50); + itss_usleep(1000*50); /* If the Radar is not connected to TMC, a TCP socket is needed to fool the Radar */ /* To maintain the connection the content must be read */ diff --git a/src/denm.c b/src/denm.c index b28c1bc..7be0a2e 100644 --- a/src/denm.c +++ b/src/denm.c @@ -432,7 +432,7 @@ void* den_service() { pthread_mutex_unlock(&den->lock); ++sleep_count; - usleep(sleep4us); + itss_usleep(sleep4us); } return NULL; diff --git a/src/evm.c b/src/evm.c index 511b4e6..73125b7 100644 --- a/src/evm.c +++ b/src/evm.c @@ -410,7 +410,7 @@ void *evcsn_service() { tr_oer[0] = 4; // Facilities fi_oer[0] = 4; while (!facilities.exit) { - usleep(1000 * 1000); + itss_usleep(1000 * 1000); if (facilities.evm_args.activate) { rv = mk_evcsnm(npr->data.buf, (uint32_t *)&npr->data.size); if (rv) { diff --git a/src/infrastructure.c b/src/infrastructure.c index c6870eb..dc3dde5 100644 --- a/src/infrastructure.c +++ b/src/infrastructure.c @@ -578,7 +578,7 @@ void* infrastructure_service() { pthread_mutex_unlock(&infrastructure->lock); ++sleep_count; - usleep(sleep4us); + itss_usleep(sleep4us); } return NULL; diff --git a/src/saem.c b/src/saem.c index 2e941a3..647ca73 100644 --- a/src/saem.c +++ b/src/saem.c @@ -434,7 +434,7 @@ void *sa_service() { tolling_tlsc_mgmt(facilities.tx_queue, &security_socket); } - usleep(sleep_ms*1000); + itss_usleep(sleep_ms*1000); } ASN_STRUCT_FREE(asn_DEF_EIS_NetworkingRequest, nr); diff --git a/src/vcm.c b/src/vcm.c index b5c6b50..903f186 100644 --- a/src/vcm.c +++ b/src/vcm.c @@ -1210,7 +1210,7 @@ void* vc_service() { } pthread_mutex_unlock(&coordination->lock); - usleep(50 * 1000); + itss_usleep(50 * 1000); } itss_0close(coordination->mgmt_socket);