From 339b0f68f21e63e6f1979af60c480335ef9ac9b2 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Fri, 3 Feb 1995 21:47:48 +0000 Subject: [PATCH] Define CLOCKS_PER_SEC. Define CLK_TCK only if _ANSI_SOURCE is not defined. Don't include to get the definition of CLK_TCK. CLK_TCK should never have been defined there, and the inclusion polluted the namespace. --- include/time.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/time.h b/include/time.h index f6473d016d0f..be6b35fa923b 100644 --- a/include/time.h +++ b/include/time.h @@ -43,6 +43,17 @@ #include +#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 /* Include file containing CLK_TCK. */ - #include __BEGIN_DECLS