/*
** time.h
*/

imports <stdlib> ;

typedef struct timeval {
 long	tv_sec;		 
 long	tv_usec;	 
} __timeval;

typedef struct timezone {
 int	tz_minuteswest;	 
 int	tz_dsttime;	 
} __timezone;

enum { DST_NONE, DST_USA, DST_AUST, DST_WET, DST_MET, DST_EET } __timezones;

| bool : int | timerisset(struct timeval tvp) { ensures true; }

void timerclear(struct timeval tvp);

constant int ITIMER_REAL;
constant int ITIMER_VIRTUAL;
constant int ITIMER_PROF;

typedef struct itimerval {
 struct	timeval it_interval;	 
 struct	timeval it_value;	 
} __itimerval;

typedef 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 ;
 long	tm_gmtoff ;
 char	*tm_zone ;
} __tm;

typedef int time_t ;
typedef int clock_t ;

constant int CLOCKS_PER_SEC ;

char * 	asctime(  struct tm *__tm ) { ensures true; }
clock_t 	clock( void ) { ensures true; }
char * 	ctime(  time_t *__clock ); 
double 	difftime( time_t __time1, time_t __time0 ) { ensures true; }
struct tm * gmtime(  time_t *__clock ) { ensures true; }
struct tm * localtime(  time_t *__clock ) { ensures true; }
time_t 	mktime( struct tm *__timeptr ) { ensures true; }
size_t 	strftime( char *__s, size_t __maxsize,
			 char *__format,  struct tm *__tm ) { ensures true; }
time_t 	time( time_t *__tloc ) {ensures true; }

char *tzname[];

char *timezone() { ensures true; }


