#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
RT_TASK demo_task;
void demo(void *arg)
{
RTIME now, previous;
while (1) {
printf("Time since last turn: %ld.%06ld ms\n",
(long)(now - previous) / 1000000,
(long)(now - previous) % 1000000);
previous = now;
}
}
void catch_signal(int sig)
{
}
int main(int argc, char* argv[])
{
signal(SIGTERM, catch_signal);
signal(SIGINT, catch_signal);
mlockall(MCL_CURRENT|MCL_FUTURE);
pause();
return 0;
}