I've written the following code:
#include <sys/timerfd.h>
#include <ctime>
#include <inttypes.h>
#include <unistd.h>
#include <stdio.h>
int main()
{
printf("Test_message");
int tfd;
uint64_t count;
tfd= timerfd_create(CLOCK_MONOTONIC,0);
itimerspec itimer;
itimer.it_interval={1,0};
itimer.it_value={1,0};
timerfd_settime(tfd,0,&itimer,NULL);
while(true)
{
read(tfd, &count, sizeof(count));
}
}
When I'm compiling and linking we have no output to console. But I'm expected that the Test_message
will be printed.