#ifndef __time_h
#define __time_h
#pragma once

/*
 * 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 */

/* modified - ryb */

#ifndef NULL
#define NULL 0
#endif

#define CLK_TCK 50
#define CLOCKS_PER_SEC CLK_TCK

#ifndef __sys_stdtypes_h
#include <sys/stdtypes.h>
#endif

#ifndef _DF_SIZE_T
#define _DF_SIZE_T
typedef _TD_SIZE_T	size_t;
#endif

#ifndef _DF_CLOCK_T
#define _DF_CLOCK_T
typedef _TD_CLOCK_T	clock_t;
#endif

#ifndef _DF_TIME_T
#define _DF_TIME_T
typedef _TD_TIME_T	time_t;
#endif

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;	/* positive implies daylight savings */
};

char		*asctime (const struct tm *);
clock_t		 clock (void);
char		*ctime (const time_t *);
double		 difftime (time_t, time_t);
struct tm	*gmtime (const time_t *);
struct tm	*localtime (const time_t *);
time_t		 mktime (struct tm *);
time_t		 time (time_t *);

#ifndef __STRICT_ANSI__
int		 dayofw (const time_t *);
double		 jday (const time_t *);
#endif

#endif /* __time_h */
