/*
 * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
 * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
 *
 * This code is freely redistributable upon the conditions that this 
 * notice remains intact and that modified versions of this file not
 * be included as part of the PDC Software Distribution without the
 * express consent of the copyright holders.  No warrantee of any
 * kind is provided with this code.  For further information, contact:
 *
 *  PDC Software Distribution    Internet:                     BIX:
 *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
 *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
 */

/* time.h - standard C time functions and definitions */

/*
 *  3.3.91 sjw; K&R2
 * 23.3.91 sjw; make jday() int, not double
 */

#ifndef __TIME_H__
#define __TIME_H__

#ifndef __STDDEF_H__
#include <stddef.h>
#endif

#define CLK_TCK 50  

struct tm {
    int tm_sec;   /* seconds; range 0..59 */
    int tm_min;   /* minutes; range 0..59 */
    int tm_hour;  /* hours since midnight; range 0..23 */
    int tm_mday;  /* day of month; range 1..31 */
    int tm_mon;   /* month; range 0..11 */
    int tm_year;  /* year; with 0==1900 */
    int tm_wday;  /* day of week; range Sun=0..6 */
    int tm_yday;  /* day of year; range 0..365 */
    int tm_isdst; /* nonzero implies daylight savings */
};

clock_t    clock(void);
time_t     time(time_t *tp);
double     difftime(time_t time2, time_t time1);
time_t     mktime(struct tm *tp);
char      *asctime(const struct tm *tp);
char      *ctime(const time_t *tp);
struct tm *gmtime(const time_t *tp);
struct tm *localtime(const time_t *tp);
#if 0
size_t strftime(char *s, size_t max, const char *fmt, const struct tm *tp);
#endif

/*
 * extras
 */

int     jday(time_t *t);
int     dayofw(time_t *t);

#endif /* __TIME_H__ */

