version 1.16, 2003/08/01 17:38:33 |
version 1.17, 2005/12/13 00:35:22 |
|
|
#ifndef _TIME_H_ |
#ifndef _TIME_H_ |
#define _TIME_H_ |
#define _TIME_H_ |
|
|
|
#include <sys/cdefs.h> |
#include <machine/ansi.h> |
#include <machine/ansi.h> |
|
|
#ifndef NULL |
#ifndef NULL |
|
|
#undef _BSD_SIZE_T_ |
#undef _BSD_SIZE_T_ |
#endif |
#endif |
|
|
#define CLOCKS_PER_SEC 100 |
#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE |
|
/* |
|
* Frequency of the clock ticks reported by times(). Deprecated - use |
|
* sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) |
|
*/ |
|
#define CLK_TCK 100 |
|
#endif |
|
|
|
#define CLOCKS_PER_SEC 100 /* frequency of ticks reported by clock(). */ |
|
|
|
#ifndef _TIMESPEC_DECLARED |
|
#define _TIMESPEC_DECLARED |
|
struct timespec { |
|
time_t tv_sec; /* seconds */ |
|
long tv_nsec; /* and nanoseconds */ |
|
}; |
|
#endif |
|
|
struct tm { |
struct tm { |
int tm_sec; /* seconds after the minute [0-60] */ |
int tm_sec; /* seconds after the minute [0-60] */ |
int tm_min; /* minutes after the hour [0-59] */ |
int tm_min; /* minutes after the hour [0-59] */ |
|
|
char *tm_zone; /* timezone abbreviation */ |
char *tm_zone; /* timezone abbreviation */ |
}; |
}; |
|
|
#include <sys/cdefs.h> |
|
|
|
__BEGIN_DECLS |
__BEGIN_DECLS |
struct timespec; |
struct timespec; |
char *asctime(const struct tm *); |
char *asctime(const struct tm *); |
|
|
struct tm *localtime_r(const time_t *, struct tm *); |
struct tm *localtime_r(const time_t *, struct tm *); |
int nanosleep(const struct timespec *, struct timespec *); |
int nanosleep(const struct timespec *, struct timespec *); |
|
|
#if !defined(_ANSI_SOURCE) |
#if __POSIX_VISIBLE |
#define CLK_TCK 100 |
|
extern char *tzname[2]; |
extern char *tzname[2]; |
void tzset(void); |
void tzset(void); |
#endif /* not ANSI */ |
#endif |
|
|
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) |
#if __BSD_VISIBLE |
char *timezone(int, int); |
char *timezone(int, int); |
void tzsetwall(void); |
void tzsetwall(void); |
time_t timelocal(struct tm *); |
time_t timelocal(struct tm *); |
time_t timegm(struct tm *); |
time_t timegm(struct tm *); |
time_t timeoff(struct tm *, const long); |
time_t timeoff(struct tm *, const long); |
#endif /* neither ANSI nor POSIX */ |
#endif |
__END_DECLS |
__END_DECLS |
|
|
#endif /* !_TIME_H_ */ |
#endif /* !_TIME_H_ */ |