RTE RBC 2oo2 Reference Application
0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
Toggle main menu visibility
Loading...
Searching...
No Matches
ab_gp_channel_util.c
Go to the documentation of this file.
1
/* _POSIX_C_SOURCE 200809L: nanosleep() below is POSIX.1-2001, not base
2
* ISO C99; needed before any header is included. Isolated to this one
3
* translation unit - see ab_gp_channel_types.h's own doc on
4
* ab_gp_channel_sleep_ms(). */
5
#define _POSIX_C_SOURCE 200809L
6
13
#include "
ab_gp_channel_util.h
"
14
15
#include <time.h>
16
18
20
22
24
26
27
29
void
ab_gp_channel_sleep_ms
(
unsigned
int
ms)
30
{
31
struct
timespec ts;
32
33
ts.tv_sec = (time_t)(ms / 1000U);
34
ts.tv_nsec = (long)((ms % 1000U) * 1000000L);
35
(void)nanosleep(&ts, NULL);
36
}
ab_gp_channel_sleep_ms
void ab_gp_channel_sleep_ms(unsigned int ms)
Definition
ab_gp_channel_util.c:29
ab_gp_channel_util.h
Declares ab_gp_channel_sleep_ms() - see ab_gp_channel_types.h's own doc on why this tiny helper gets ...
src
application
AB
GP
com
ab_gp_channel_util.c
Generated by
1.18.0