/*
 * |-----------------------------------------------------------|
 * | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
 * | All Rights Reserved                                       |
 * |-----------------------------------------------------------|
 * |          Restricted Rights Legend                         |
 * | Use, duplication, or disclosure by the Government is      |
 * | subject to restrictions as set forth in                   |
 * | subparagraph (c)(1)(ii) of the Rights in Technical        |
 * | Data and Computer Software Clause of DFARS 252.227-7013.  |
 * |         MIPS Computer Systems, Inc.                       |
 * |         950 DeGuigne Avenue                               |
 * |         Sunnyvale, California 94088-3650, USA             |
 * |-----------------------------------------------------------|
 */
/* $Header: time.h,v 1.16.2.1 92/06/24 13:57:23 marker Exp $ */

#ifndef	_TIME_
#define	_TIME_	1


/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ifndef	NULL
#define NULL 	0
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef	unsigned int	size_t;
#endif


#ifndef _TIME_T
#define _TIME_T
typedef	long	time_t;
#endif

#ifndef _CLOCK_T
#define _CLOCK_T
typedef	unsigned long 	clock_t;
#endif

struct	tm {	/* see ctime(3) */
	int	tm_sec; /* seconds after the minute- [0,6] */
	int	tm_min; /* minutes after the hour-   [0,59] */
	int	tm_hour; /* hours since midnight-    [0,23] */
	int	tm_mday; /* day of the month-        [1,31] */
	int	tm_mon; /* months since January-     [0,11] */
	int	tm_year; /* years since 1900 */
	int	tm_wday; /* days since Sunday-       [0,6] */
	int	tm_yday; /* days since January 1-    [0,365] */
	int	tm_isdst; /* Daylight Savings Time flag */
};

#if defined(__STDC__)
  /* processor time used */
#define CLOCKS_PER_SEC	100

  clock_t clock(void);

/* converts broken down time into calendar time */
extern time_t mktime(struct tm *);

/* determines the current calendar time */
extern time_t time(time_t *);

/* converts broken down time into string */
extern char *asctime(const struct tm *);

/* converts calendar time to local time in the form of a string */
extern char *ctime(const time_t *);

/* converts calendar time into a broken down time expressed as UTC */
extern struct tm *gmtime(const time_t *);

/* converts calendar time into a broken-down time expressed as local time */
extern struct tm *localtime(const time_t *);

/* formats a string that represents time from broken down time */

extern size_t strftime(char *, size_t,
		       const char *, const struct tm *);

#if (__STDC__ == 0)
extern void tzset(void);
extern long timezone,altzone;
extern int daylight;
extern char *tzname[];
extern int cftime(char *, char *, const time_t *);
extern int ascftime(char *, const char *, const struct tm *);
#endif

#else  /* __STDC__ */
extern struct tm *gmtime(), *localtime();
extern char *ctime(), *asctime();
int  cftime(),  ascftime();
extern void tzset();
extern long timezone, altzone;
extern int daylight;
extern char *tzname[];
extern size_t strftime();

#endif	/* __STDC__ */

#endif	/* _TIME_ */

