Lines Matching refs:timerfd
21 #include <sys/timerfd.h>
57 int timerfd = timerfd_create(CLOCK_REALTIME, 0);
58 EXPECT_NE(timerfd, -1);
66 EXPECT_EQ(timerfd_settime(timerfd, 0, &newValue, nullptr), 0);
69 EXPECT_EQ(read(timerfd, &expirations, sizeof(expirations)), sizeof(expirations));
72 int ret = timerfd_gettime(timerfd, &oldValue);
76 close(timerfd);
89 int timerfd = timerfd_create(CLOCK_MONOTONIC, 0);
90 EXPECT_NE(timerfd, -1);
96 EXPECT_EQ(timerfd_settime(timerfd, 0, &newValue, nullptr), 0);
99 EXPECT_EQ(read(timerfd, &expirations, sizeof(expirations)), sizeof(expirations));
102 close(timerfd);
115 int timerfd = timerfd_create(CLOCK_BOOTTIME, 0);
116 EXPECT_NE(timerfd, -1);
123 EXPECT_EQ(timerfd_settime(timerfd, 0, &newValue, nullptr), 0);
126 EXPECT_EQ(read(timerfd, &expirations, sizeof(expirations)), sizeof(expirations));
129 close(timerfd);
142 int timerfd = timerfd_create(CLOCK_REALTIME_ALARM, 0);
143 EXPECT_NE(timerfd, -1);
150 EXPECT_EQ(timerfd_settime(timerfd, 0, &newValue, nullptr), 0);
153 EXPECT_EQ(read(timerfd, &expirations, sizeof(expirations)), sizeof(expirations));
156 close(timerfd);
169 int timerfd = timerfd_create(CLOCK_BOOTTIME_ALARM, 0);
170 EXPECT_NE(timerfd, -1);
176 EXPECT_EQ(timerfd_settime(timerfd, 0, &newValue, nullptr), 0);
179 EXPECT_EQ(read(timerfd, &expirations, sizeof(expirations)), sizeof(expirations));
182 close(timerfd);
195 int timerfd = timerfd_create(CLOCK_REALTIME, TFD_NONBLOCK);
196 EXPECT_NE(timerfd, -1);
204 EXPECT_EQ(timerfd_settime(timerfd, 0, &newValue, nullptr), 0);
207 ssize_t result = read(timerfd, &expirations, sizeof(expirations));
211 close(timerfd);
224 int timerfd = timerfd_create(CLOCK_REALTIME, 0);
225 EXPECT_NE(timerfd, -1);
232 EXPECT_EQ(timerfd_settime(timerfd, TFD_TIMER_ABSTIME, &newValue, nullptr), 0);
235 EXPECT_EQ(read(timerfd, &expirations, sizeof(expirations)), sizeof(expirations));
238 close(timerfd);