Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Nov 2002 16:13:47 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        Hiten Pandya <hiten@unixdaemons.com>, <freebsd-standards@FreeBSD.ORG>
Subject:   Re: CLOCK_REALTIME and TIME_ABSTIME missing from time.h
Message-ID:  <20021124160549.G52232-100000@gamplex.bde.org>
In-Reply-To: <20021123114850.B99548@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 23 Nov 2002, Mike Barcroft wrote:

> Hiten Pandya <hiten@unixdaemons.com> writes:
> > Hello.
> >
> > After doing some work on posixtest, I have found out, that time.h is
> > missing CLOCK_REALTIME, and TIME_ABSTIME.  Is there a reason to why
> > we dont have these #define's?
>
> They are listed as TMR (Timer) options in POSIX.  We don't currently
> support this option.

TIME_ABSTIME seems to be a misspelling of TIMER_ABSTIME.  Neither is
supported, so they probably shouldn't be defined.  But TIMER_ABSTIME
is defined in a wrong place (<sys/time.h>).

CLOCK_REALTIME is the only CLOCK_* timer that is supported.  It is
defined in a wrong place (<sys/time.h>).  In needed to "fix" this when
I fixed the namespace pollution of including <sys/time.h> in
<sys/stat.h>.  The following patch doesn't fix the misplacement of
things in <sys/time.h>:

%%%
Index: time.h
===================================================================
RCS file: /home/ncvs/src/include/time.h,v
retrieving revision 1.30
diff -u -2 -r1.30 time.h
--- time.h	6 Sep 2002 11:23:32 -0000	1.30
+++ time.h	6 Sep 2002 12:43:56 -0000
@@ -64,4 +62,13 @@
 #endif

+#if __POSIX_VISIBLE >= 199309
+#define	CLOCK_REALTIME	0
+#define	CLOCK_VIRTUAL	1
+#define	CLOCK_PROF	2
+
+#define	TIMER_RELTIME	0x0	/* relative timer */
+#define	TIMER_ABSTIME	0x1	/* absolute timer */
+#endif
+
 #ifndef _CLOCK_T_DECLARED
 typedef	__clock_t	clock_t;
%%%

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021124160549.G52232-100000>