1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 1987 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 /* Copyright (c) 1984 AT&T */ 28 /* All Rights Reserved */ 29 30 #ifndef __5include_time_h 31 #define __5include_time_h 32 33 #pragma ident "%Z%%M% %I% %E% SMI" 34 35 #include <sys/stdtypes.h> 36 37 #ifndef NULL 38 #define NULL 0 39 #endif 40 41 struct tm { /* see ctime(3) */ 42 int tm_sec; 43 int tm_min; 44 int tm_hour; 45 int tm_mday; 46 int tm_mon; 47 int tm_year; 48 int tm_wday; 49 int tm_yday; 50 int tm_isdst; 51 char *tm_zone; 52 long tm_gmtoff; 53 }; 54 55 /* 56 * Following 2 lines are required to make CLK_TCK work. 57 * If they change here they have to change in <sys/unistd.h> as well. 58 */ 59 extern long sysconf(/* int name */); 60 #define _SC_CLK_TCK 3 /* clock ticks/sec */ 61 /* 62 * POSIX.1 uses CLK_TCK to specify units used by times(3). 63 * POSIX.1a doesn't use a name for this and says CLK_TCK is obsolescent, but 64 * we'll probably have to support it for a long time. 65 */ 66 #define CLK_TCK (sysconf(_SC_CLK_TCK)) 67 /* 881207 ANSI C draft uses CLOCKS_PER_SEC to specify units used by clock(3). */ 68 #define CLOCKS_PER_SEC 1000000L 69 70 extern char * asctime(/* const struct tm *t */); 71 extern char * ctime(/* const time_t *t */); 72 extern struct tm * gmtime(/* const time_t *t */); 73 extern struct tm * localtime(/* const time_t *t */); 74 extern time_t mktime(/* struct tm *timeptr */); 75 extern size_t strftime(/* char *s, size_t maxsize, const char *format, 76 const struct tm *timeptr */); 77 extern time_t time(/* time_t *t */); 78 extern void tzset(/* void */); 79 80 extern char *tzname[]; 81 #ifndef _POSIX_SOURCE 82 extern int daylight; 83 extern long timezone; 84 extern void tzsetwall(/* void */); 85 #endif /* !_POSIX_SOURCE */ 86 87 #endif /* !__5include_time_h */ 88