1 /* @(#)times.h	1.1 09/07/13 Copyright 2009 J. Schilling */
2 /*
3  *	Times abstraction
4  *
5  *	Copyright (c) 2009 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #ifndef	_SCHILY_TIMES_H
22 #define	_SCHILY_TIMES_H
23 
24 #ifndef _SCHILY_MCONFIG_H
25 #include <schily/mconfig.h>
26 #endif
27 #ifndef	_SCHILY_TIME_H
28 #include <schily/time.h>
29 #endif
30 #ifndef	_SCHILY_LIMITS_H
31 #include <schily/limits.h>
32 #endif
33 #ifndef	_SCHILY_UNISTD_H
34 #include <schily/unistd.h>
35 #endif
36 
37 /*
38  * Make sure to include schily/time.h before, because of a Next Step bug.
39  */
40 #ifdef	HAVE_SYS_TIMES_H
41 #ifndef	_INCL_SYS_TIMES_H
42 #define	_INCL_SYS_TIMES_H
43 #include <sys/times.h>
44 #endif
45 #endif
46 
47 #ifndef	CLK_TCK
48 #if	defined(_SC_CLK_TCK)
49 #define	CLK_TCK	((clock_t)sysconf(_SC_CLK_TCK))
50 #else
51 #define	CLK_TCK	60
52 #endif
53 #endif
54 
55 #endif	/* _SCHILY_TIMES_H */
56