Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Header file for Linux-specific timerfd API
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdruppe committed Sep 11, 2015
1 parent c68373a commit d4ef137
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/core/sys/linux/timerfd.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* D header file to interface with the Linux timefd API <http://man7.org/linux/man-pages/man2/timerfd_create.2.html>
* Available since Linux 2.6
*
* License : $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
*/
module core.sys.linux.timerfd;

version (linux):

public import core.sys.posix.time;

extern (C):
@system:
@nogc:
nothrow:

int timerfd_create(int clockid, int flags);
int timerfd_settime(int fd, int flags, const itimerspec* new_value, itimerspec* old_value);
int timerfd_gettime(int fd, itimerspec* curr_value);

enum TFD_TIMER_ABSTIME = 1 << 0;
enum TFD_CLOEXEC = 0x80000;
enum TFD_NONBLOCK = 0x800;

0 comments on commit d4ef137

Please sign in to comment.