diff options
author | guenther <guenther@openbsd.org> | 2013-06-17 19:11:54 +0000 |
---|---|---|
committer | guenther <guenther@openbsd.org> | 2013-06-17 19:11:54 +0000 |
commit | 7b36c281ba1c99d528efca950572c207acd2e184 (patch) | |
tree | f5c2b481403a1c10e5fb3838834ab4fd89d0397e /include/time.h | |
parent | 2nd part of: (diff) | |
download | wireguard-openbsd-7b36c281ba1c99d528efca950572c207acd2e184.tar.xz wireguard-openbsd-7b36c281ba1c99d528efca950572c207acd2e184.zip |
Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.
Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@
Diffstat (limited to 'include/time.h')
-rw-r--r-- | include/time.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/time.h b/include/time.h index 95e01b712e0..537d9eaa0fc 100644 --- a/include/time.h +++ b/include/time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: time.h,v 1.24 2013/04/02 05:16:14 guenther Exp $ */ +/* $OpenBSD: time.h,v 1.25 2013/06/17 19:11:54 guenther Exp $ */ /* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */ /* @@ -101,6 +101,13 @@ typedef __timer_t timer_t; #endif #endif +#if __POSIX_VISIBLE >= 200112 +#ifndef _PID_T_DEFINED_ +#define _PID_T_DEFINED_ +typedef __pid_t pid_t; +#endif +#endif + struct tm { int tm_sec; /* seconds after the minute [0-60] */ int tm_min; /* minutes after the hour [0-59] */ @@ -154,6 +161,10 @@ int clock_settime(clockid_t, const struct timespec *); int nanosleep(const struct timespec *, struct timespec *); #endif +#if __POSIX_VISIBLE >= 200112 +int clock_getcpuclockid(pid_t, clockid_t *); +#endif + #if __BSD_VISIBLE char *timezone(int, int); void tzsetwall(void); |