aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/core/sys/posix/time.d
diff options
context:
space:
mode:
Diffstat (limited to 'libphobos/libdruntime/core/sys/posix/time.d')
-rw-r--r--libphobos/libdruntime/core/sys/posix/time.d45
1 files changed, 45 insertions, 0 deletions
diff --git a/libphobos/libdruntime/core/sys/posix/time.d b/libphobos/libdruntime/core/sys/posix/time.d
index d6a9314..4f62a92 100644
--- a/libphobos/libdruntime/core/sys/posix/time.d
+++ b/libphobos/libdruntime/core/sys/posix/time.d
@@ -65,6 +65,10 @@ else version (NetBSD)
{
time_t timegm(tm*); // non-standard
}
+else version (OpenBSD)
+{
+ time_t timegm(tm*); // non-standard
+}
else version (DragonFlyBSD)
{
time_t timegm(tm*); // non-standard
@@ -145,6 +149,11 @@ else version (NetBSD)
// time.h
enum CLOCK_MONOTONIC = 3;
}
+else version (OpenBSD)
+{
+ // time.h
+ enum CLOCK_MONOTONIC = 3;
+}
else version (DragonFlyBSD)
{ // time.h
enum CLOCK_MONOTONIC = 4;
@@ -335,6 +344,30 @@ else version (NetBSD)
int timer_getoverrun(timer_t);
int timer_settime(timer_t, int, in itimerspec*, itimerspec*);
}
+else version (OpenBSD)
+{
+ struct itimerspec
+ {
+ timespec it_interval;
+ timespec it_value;
+ }
+
+ enum CLOCK_REALTIME = 0;
+ enum TIMER_ABSTIME = 0x1;
+
+ alias int clockid_t; // <sys/_types.h>
+ alias int timer_t;
+
+ int clock_getres(clockid_t, timespec*);
+ int clock_gettime(clockid_t, timespec*);
+ int clock_settime(clockid_t, in timespec*);
+ int nanosleep(in timespec*, timespec*);
+ int timer_create(clockid_t, sigevent*, timer_t*);
+ int timer_delete(timer_t);
+ int timer_gettime(timer_t, itimerspec*);
+ int timer_getoverrun(timer_t);
+ int timer_settime(timer_t, int, in itimerspec*, itimerspec*);
+}
else version (Solaris)
{
enum CLOCK_PROCESS_CPUTIME_ID = 5; // <sys/time_impl.h>
@@ -499,6 +532,13 @@ else version (NetBSD)
tm* gmtime_r(in time_t*, tm*);
tm* localtime_r(in time_t*, tm*);
}
+else version (OpenBSD)
+{
+ char* asctime_r(in tm*, char*);
+ char* ctime_r(in time_t*, char*);
+ tm* gmtime_r(in time_t*, tm*);
+ tm* localtime_r(in time_t*, tm*);
+}
else version (DragonFlyBSD)
{
char* asctime_r(in tm*, char*);
@@ -578,6 +618,11 @@ else version (NetBSD)
tm* getdate(in char*);
char* strptime(in char*, in char*, tm*);
}
+else version (OpenBSD)
+{
+ //tm* getdate(in char*);
+ char* strptime(in char*, in char*, tm*);
+}
else version (DragonFlyBSD)
{
//tm* getdate(in char*);