In the manner of Solaris and other OSes, we now define CLK_TCK to

expand to a call to __sysconf(_SC_CLK_TCK), rather than hard coding it
as a constant.
This commit is contained in:
perry 2002-06-23 19:41:04 +00:00
parent ea360bda1a
commit 25e1b60346

View File

@ -1,4 +1,4 @@
/* $NetBSD: time.h,v 1.27 2001/03/31 18:29:20 kleink Exp $ */
/* $NetBSD: time.h,v 1.28 2002/06/23 19:41:04 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -46,7 +46,6 @@
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/ansi.h>
#include <machine/limits.h> /* Include file containing CLK_TCK. */
#include <sys/null.h>
@ -104,7 +103,15 @@ size_t strftime __P((char * __restrict, size_t, const char * __restrict,
time_t time __P((time_t *));
#if !defined(_ANSI_SOURCE)
#define CLK_TCK 100
/*
* CLK_TCK uses libc's internal __sysconf() to retrieve the machine's
* HZ. The value of _SC_CLK_TCK is 3 -- we hard code it so we do not
* need to include unistd.h
*/
long __sysconf __P((int));
#define CLK_TCK (__sysconf(3))
extern __aconst char *tzname[2];
void tzset __P((void));