RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
Loading...
Searching...
No Matches
gateway_c_util.c
Go to the documentation of this file.
1#define _POSIX_C_SOURCE 200809L
2
7#include "gateway_c_util.h"
8
9#include <time.h>
10
11void gateway_c_sleep_ms(unsigned int ms)
12{
13 struct timespec ts;
14
15 ts.tv_sec = (time_t)(ms / 1000U);
16 ts.tv_nsec = (long)((ms % 1000U) * 1000000L);
17 (void)nanosleep(&ts, NULL);
18}
void gateway_c_sleep_ms(unsigned int ms)
Declares gateway_c_sleep_ms() - see gateway_c_types.h's own doc.