/*
 * $Header: /smsa/bsd:include/time.h:bsd  1.10  $
 * $Source: /smsa/bsd:include/time.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 *
 */
/*	time.h	1.1	85/03/13	*/

#ifndef __time_h
#define __time_h

#ifndef __size_t
#define __size_t 1
typedef unsigned int size_t;   /* from <stddef.h> */
#endif

#ifndef NULL
#  define NULL 0
#endif

#ifndef __clock_t
#define __clock_t 1
typedef unsigned int clock_t;    /* cpu time type - units of CLK_TCK or CLOCKS_PER_SEC  */
#endif
#ifndef __time_t
#define __time_t 1
typedef long time_t;	         /* date/time in unix secs past 1-Jan-70 */
#endif

#define CLOCKS_PER_SEC 100

/*
 * Structure returned by gmtime and localtime calls (see ctime(3)).
 */
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;
};

extern clock_t clock(void);
extern double difftime(time_t /*time1*/, time_t /*time0*/);
extern time_t mktime(struct tm * /*timeptr*/);
extern time_t time(time_t * /*timer*/);

extern char *asctime(const struct tm * /*timeptr*/);
extern char *ctime(const time_t * /*timer*/);
extern struct tm *gmtime(const time_t * /*timer*/);
extern struct tm *localtime(const time_t * /*timer*/);
extern size_t strftime(char * /*s*/, size_t /*maxsize*/,
                       const char * /*format*/, const struct tm * /*timeptr*/);

#if defined(_XOPEN_C)
#define CLK_TCK CLOCKS_PER_SEC

extern void tzset(void);
extern int daylight;
extern long timezone;
extern char *tzname[];
#endif

#endif/*__time_h*/

/* end of time.h */
