31 # include <rtai_lxrt.h> 32 # include <rtai_posix.h> 33 # if defined(_SYSTEM_LXRT_33_) || defined(_SYSTEM_LXRT_35_) 34 # include <mca_lxrt_extension.h> 40 namespace hidden_posix {
47 # if defined(_SYSTEM_LXRT_33_) || defined(_SYSTEM_LXRT_35_) 49 mcalxrt_do_gettimeofday(&tv);
51 time->
tv_nsec = tv.tv_usec * 1000;
53 RTIME real_time = rt_get_real_time_ns();
54 nanos2timespec(real_time, time);
63 time->
tv_nsec = tv.tv_usec * 1000;
72 rt_sleep(nano2count(RTIME(1000000*rqtp->
tv_sec + rqtp->
tv_nsec)));
88 unsigned int sleep(
unsigned int seconds)
93 rt_sleep(nano2count(RTIME(1000000000*seconds)));
108 rt_sleep(nano2count(RTIME(1000*useconds)));
Posix implementation of the global functions for time manipulation,.
unsigned int sleep(unsigned int seconds)
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
Contains global LXRT functions.
void gettimeofday(struct timespec *time)
int usleep(unsigned long useconds)