#ifndef _TIME_H
#if (! defined __need_time_t && !defined __need_clock_t && \
! defined __need_timespec)
# define _TIME_H 1
# include
__BEGIN_DECLS
#endif
#ifdef _TIME_H
# define __need_size_t
# define __need_NULL
# include
# include
# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
# ifndef CLK_TCK
# define CLK_TCK CLOCKS_PER_SEC
# endif
# endif
#endif
#if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t)
# define __clock_t_defined 1
# include
__BEGIN_NAMESPACE_STD
typedef __clock_t clock_t;
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC
__USING_NAMESPACE_STD(clock_t)
#endif
#endif
#undef __need_clock_t
#if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t)
# define __time_t_defined 1
# include
__BEGIN_NAMESPACE_STD
typedef __time_t time_t;
__END_NAMESPACE_STD
#if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID
__USING_NAMESPACE_STD(time_t)
#endif
#endif
#undef __need_time_t
#if !defined __clockid_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t)
# define __clockid_t_defined 1
# include
typedef __clockid_t clockid_t;
#endif
#undef __clockid_time_t
#if !defined __timer_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t)
# define __timer_t_defined 1
# include
typedef __timer_t timer_t;
#endif
#undef __need_timer_t
#if !defined __timespec_defined && \
((defined _TIME_H && \
(defined __USE_POSIX199309 || defined __USE_MISC)) || \
defined __need_timespec)
# define __timespec_defined 1
struct timespec
{
__time_t tv_sec;
long int tv_nsec;
};
#endif
#undef __need_timespec
#ifdef _TIME_H
__BEGIN_NAMESPACE_STD
struct tm
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
#ifdef __USE_BSD
long int tm_gmtoff;
__const char *tm_zone;
#else
long int __tm_gmtoff;
__const char *__tm_zone;
#endif
};
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC
__USING_NAMESPACE_STD(tm)
#endif
#ifdef __USE_POSIX199309
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
struct sigevent;
#endif
#ifdef __USE_XOPEN2K
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
# endif
#endif
__BEGIN_NAMESPACE_STD
extern clock_t clock (void) __THROW;
extern time_t time (time_t *__timer) __THROW;
extern double difftime (time_t __time1, time_t __time0)
__THROW __attribute__ ((__const__));
extern time_t mktime (struct tm *__tp) __THROW;
extern size_t strftime (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_XOPEN
extern char *strptime (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp)
__THROW;
# endif
# ifdef __USE_GNU
# include
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp,
__locale_t __loc) __THROW;
extern char *strptime_l (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp,
__locale_t __loc) __THROW;
# endif
__BEGIN_NAMESPACE_STD
extern struct tm *gmtime (__const time_t *__timer) __THROW;
extern struct tm *localtime (__const time_t *__timer) __THROW;
__END_NAMESPACE_STD
# if defined __USE_POSIX || defined __USE_MISC
extern struct tm *gmtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
extern struct tm *localtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
# endif
__BEGIN_NAMESPACE_STD
extern char *asctime (__const struct tm *__tp) __THROW;
extern char *ctime (__const time_t *__timer) __THROW;
__END_NAMESPACE_STD
# if defined __USE_POSIX || defined __USE_MISC
extern char *asctime_r (__const struct tm *__restrict __tp,
char *__restrict __buf) __THROW;
extern char *ctime_r (__const time_t *__restrict __timer,
char *__restrict __buf) __THROW;
# endif
extern char *__tzname[2];
extern int __daylight;
extern long int __timezone;
# ifdef __USE_POSIX
extern char *tzname[2];
extern void tzset (void) __THROW;
# endif
# if defined __USE_SVID || defined __USE_XOPEN
extern int daylight;
extern long int timezone;
# endif
# ifdef __USE_SVID
extern int stime (__const time_t *__when) __THROW;
# endif
# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
# ifdef __USE_MISC
extern time_t timegm (struct tm *__tp) __THROW;
extern time_t timelocal (struct tm *__tp) __THROW;
extern int dysize (int __year) __THROW __attribute__ ((__const__));
# endif
# ifdef __USE_POSIX199309
extern int nanosleep (__const struct timespec *__requested_time,
struct timespec *__remaining);
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
__THROW;
# ifdef __USE_XOPEN2K
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
__const struct timespec *__req,
struct timespec *__rem);
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
# endif
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) __THROW;
extern int timer_delete (timer_t __timerid) __THROW;
extern int timer_settime (timer_t __timerid, int __flags,
__const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) __THROW;
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
__THROW;
extern int timer_getoverrun (timer_t __timerid) __THROW;
# endif
# ifdef __USE_XOPEN_EXTENDED
extern int getdate_err;
of an error
`getdate_err' is set.
This function is a possible cancellation points and therefore not
marked with __THROW. */
extern struct tm *getdate (__const char *__string);
# endif
# ifdef __USE_GNU
of an error the return
value is != 0 with the same values as given above for `getdate_err'.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int getdate_r (__const char *__restrict __string,
struct tm *__restrict __resbufp);
# endif
__END_DECLS
#endif
#endif
|