xref: /freebsd-src/cddl/contrib/opensolaris/cmd/stat/common/statcommon.h (revision 10b9d77bf1ccf2f3affafa6261692cb92cf7e992)
1*10b9d77bSPawel Jakub Dawidek /*
2*10b9d77bSPawel Jakub Dawidek  * CDDL HEADER START
3*10b9d77bSPawel Jakub Dawidek  *
4*10b9d77bSPawel Jakub Dawidek  * The contents of this file are subject to the terms of the
5*10b9d77bSPawel Jakub Dawidek  * Common Development and Distribution License (the "License").
6*10b9d77bSPawel Jakub Dawidek  * You may not use this file except in compliance with the License.
7*10b9d77bSPawel Jakub Dawidek  *
8*10b9d77bSPawel Jakub Dawidek  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*10b9d77bSPawel Jakub Dawidek  * or http://www.opensolaris.org/os/licensing.
10*10b9d77bSPawel Jakub Dawidek  * See the License for the specific language governing permissions
11*10b9d77bSPawel Jakub Dawidek  * and limitations under the License.
12*10b9d77bSPawel Jakub Dawidek  *
13*10b9d77bSPawel Jakub Dawidek  * When distributing Covered Code, include this CDDL HEADER in each
14*10b9d77bSPawel Jakub Dawidek  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*10b9d77bSPawel Jakub Dawidek  * If applicable, add the following below this CDDL HEADER, with the
16*10b9d77bSPawel Jakub Dawidek  * fields enclosed by brackets "[]" replaced with your own identifying
17*10b9d77bSPawel Jakub Dawidek  * information: Portions Copyright [yyyy] [name of copyright owner]
18*10b9d77bSPawel Jakub Dawidek  *
19*10b9d77bSPawel Jakub Dawidek  * CDDL HEADER END
20*10b9d77bSPawel Jakub Dawidek  */
21*10b9d77bSPawel Jakub Dawidek /*
22*10b9d77bSPawel Jakub Dawidek  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
23*10b9d77bSPawel Jakub Dawidek  *
24*10b9d77bSPawel Jakub Dawidek  * Common routines for acquiring snapshots of kstats for
25*10b9d77bSPawel Jakub Dawidek  * iostat, mpstat, and vmstat.
26*10b9d77bSPawel Jakub Dawidek  */
27*10b9d77bSPawel Jakub Dawidek 
28*10b9d77bSPawel Jakub Dawidek #ifndef	_STATCOMMON_H
29*10b9d77bSPawel Jakub Dawidek #define	_STATCOMMON_H
30*10b9d77bSPawel Jakub Dawidek 
31*10b9d77bSPawel Jakub Dawidek #ifdef __cplusplus
32*10b9d77bSPawel Jakub Dawidek extern "C" {
33*10b9d77bSPawel Jakub Dawidek #endif
34*10b9d77bSPawel Jakub Dawidek 
35*10b9d77bSPawel Jakub Dawidek #include <stdio.h>
36*10b9d77bSPawel Jakub Dawidek #include <sys/types.h>
37*10b9d77bSPawel Jakub Dawidek #include <time.h>
38*10b9d77bSPawel Jakub Dawidek 
39*10b9d77bSPawel Jakub Dawidek #define	NODATE	0	/* Default:  No time stamp */
40*10b9d77bSPawel Jakub Dawidek #define	DDATE	1	/* Standard date format */
41*10b9d77bSPawel Jakub Dawidek #define	UDATE	2	/* Internal representation of Unix time */
42*10b9d77bSPawel Jakub Dawidek 
43*10b9d77bSPawel Jakub Dawidek /* Print a timestamp in either Unix or standard format. */
44*10b9d77bSPawel Jakub Dawidek void print_timestamp(uint_t);
45*10b9d77bSPawel Jakub Dawidek 
46*10b9d77bSPawel Jakub Dawidek #ifdef __cplusplus
47*10b9d77bSPawel Jakub Dawidek }
48*10b9d77bSPawel Jakub Dawidek #endif
49*10b9d77bSPawel Jakub Dawidek 
50*10b9d77bSPawel Jakub Dawidek #endif /* _STATCOMMON_H */
51