module core.c.posix.time
C Bindings | Posix Bindings

Code Map

module core.c.posix.time;

public import core.c.time;
public import core.c.posix.sys.types;


enum CLOCK_MONOTONIC;
enum CLOCK_MONOTONIC_RAW;
enum CLOCK_MONOTONIC_COARSE;
enum CLOCK_PROCESS_CPUTIME_ID;
enum CLOCK_THREAD_CPUTIME_ID;
enum CLOCK_REALTIME;
enum CLOCK_REALTIME_COARSE;
enum TIMER_ABSTIME;

alias clockid_t = i32;
alias timer_t = i32;

struct timespec
{
public:
	tv_sec: time_t;
	tv_nsec: c_long;
}

struct itimerspec
{
public:
	it_interval: timespec;
	it_value: timespec;
}

global daylight: i32;
global timezone: c_long;

fn timegm(tm*) time_t;
fn clock_getres(clockid_t, timespec*) i32;
fn clock_gettime(clockid_t, timespec*) i32;
fn clock_settime(clockid_t, const(const(timespec)*)) i32;
fn nanosleep(const(const(timespec)*), timespec*) i32;
fn timer_delete(timer_t) i32;
fn timer_gettime(timer_t, itimerspec*) i32;
fn timer_getoverrun(timer_t) i32;
fn timer_settime(timer_t, i32, const(const(itimerspec)*), itimerspec*) i32;
fn asctime_r(const(const(tm)*), char*) char*;
fn ctime_r(const(const(time_t)*), char*) char*;
fn gmtime_r(const(const(time_t)*), tm*) tm*;
fn localtime_r(const(const(time_t)*), tm*) tm*;
fn getdate(const(const(char)*)) tm*;
fn strptime(const(const(char)*), const(const(char)*), tm*) char*;