home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 May
/
W2KPRK.iso
/
apps
/
posix
/
source
/
SH
/
STD
/
H
/
TIME.H
< prev
next >
Wrap
C/C++ Source or Header
|
1999-11-17
|
951b
|
45 lines
/* time, time/date conversion */
#if ! _TIME_H
#define _TIME_H 1
#include <stddef.h> /* need size_t */
#ifndef sparc
typedef long time_t;
typedef long clock_t; /* seconds/CLK_TCK */
#endif
#if _V7 || _SYSV
#define CLK_TCK 60 /* todo: get from <sys/param.h> */
#endif
#if _BSD
#define CLK_TCK 100
#endif
#if _ST
#define CLK_TCK 200 /* ST system clock */
#endif
struct tm {
int tm_sec, tm_min, tm_hour;
int tm_mday, tm_mon, tm_year, tm_wday, tm_yday;
int tm_isdst;
long tm_gmtoff; /* BSD */
char *tm_zone; /* BSD */
};
clock_t clock ARGS((void));
time_t time ARGS((time_t *tp));
#define difftime(t1, t2) (double)((t2)-(t1))
time_t mktime ARGS((struct tm *tmp));
char *asctime ARGS((const struct tm *tmp));
char *ctime ARGS((const time_t *tp));
struct tm *gmtime ARGS((const time_t *tp));
struct tm *localtime ARGS((const time_t *tp));
size_t strftime ARGS((char *buf, size_t len, const char *fmt, const struct tm *tmp));
#endif