summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-02-03 21:47:48 +0000
committerbde <bde@FreeBSD.org>1995-02-03 21:47:48 +0000
commit2c4cd74d62bb10feaa0eb50a39a659d0e522f3c9 (patch)
tree7636881c128b64059564e3afd6e74badebb8d0df /include
parent3b53f342968b4838f3baf3278d86347a50df2958 (diff)
downloadFreeBSD-src-2c4cd74d62bb10feaa0eb50a39a659d0e522f3c9.zip
FreeBSD-src-2c4cd74d62bb10feaa0eb50a39a659d0e522f3c9.tar.gz
Define CLOCKS_PER_SEC.
Define CLK_TCK only if _ANSI_SOURCE is not defined. Don't include <machine/limits.h> to get the definition of CLK_TCK. CLK_TCK should never have been defined there, and the inclusion polluted the namespace.
Diffstat (limited to 'include')
-rw-r--r--include/time.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/time.h b/include/time.h
index f6473d0..be6b35f 100644
--- a/include/time.h
+++ b/include/time.h
@@ -43,6 +43,17 @@
#include <machine/ansi.h>
+#ifndef _ANSI_SOURCE
+/*
+ * Frequency of the clock ticks reported by times(). Deprecated - use
+ * sysconf(_SC_CLK_TCK) instead.
+ */
+#define CLK_TCK _BSD_CLOCKS_PER_SEC_
+#endif
+
+/* Frequency of the clock ticks reported by clock(). */
+#define CLOCKS_PER_SEC _BSD_CLOCKS_PER_SEC_
+
#ifndef NULL
#define NULL 0
#endif
@@ -76,8 +87,6 @@ struct tm {
char *tm_zone; /* timezone abbreviation */
};
-#include <machine/limits.h> /* Include file containing CLK_TCK. */
-
#include <sys/cdefs.h>
__BEGIN_DECLS
OpenPOWER on IntegriCloud