1 /* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
17 Cambridge, MA 02139, USA. */
20 * ANSI Standard: 4.12 DATE and TIME <time.h>
41 typedef unsigned int size_t;
48 #define NULL ((void *) 0)
52 #define CLOCKS_PER_SEC 100
53 #define CLK_TCK 100 /* That must be the same as HZ ???? */
65 /* Those are for future use. */
66 long int __tm_gmtoff__;
67 __const char *__tm_zone__;
70 #define __isleap(year) \
71 ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
73 extern char *tzname[2];
75 extern long int timezone;
79 extern int stime __P ((time_t* __tptr));
81 extern clock_t clock __P ((void));
82 extern time_t time __P ((time_t * __tp));
83 extern __CONSTVALUE double difftime __P ((time_t __time2,
84 time_t __time1)) __CONSTVALUE2;
85 extern time_t mktime __P ((struct tm * __tp));
87 extern char * asctime __P ((__const struct tm * __tp));
88 extern char * ctime __P ((__const time_t * __tp));
89 extern size_t strftime __P ((char * __s, size_t __smax,
90 __const char * __fmt, __const struct tm * __tp));
91 extern char * strptime __P ((__const char * __s, __const char * __fmt,
94 extern void tzset __P ((void));
96 extern struct tm* gmtime __P ((__const time_t *__tp));
97 extern struct tm* localtime __P ((__const time_t * __tp));
100 /* Miscellaneous functions many Unices inherited from the public domain
101 localtime package. These are included only for compatibility. */
103 /* Like `mktime', but for TP represents Universal Time, not local time. */
104 extern time_t timegm __P ((struct tm *__tp));
106 /* Another name for `mktime'. */
107 extern time_t timelocal __P ((struct tm *__tp));
111 #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT)
113 extern char * asctime_r __P((__const struct tm *, char *));
114 extern char * ctime_r __P((__const time_t *, char *));
115 extern struct tm* gmtime_r __P((__const time_t *, struct tm *));
116 extern struct tm* localtime_r __P((__const time_t *, struct tm *));
122 /* IEEE Std 1003.1b-1993. */
123 extern int nanosleep __P((__const struct timespec *__rqtp,
124 struct timespec *__rmtp));