/* Copyright 1989, 1990, 1992 Digital Equipment Corporation All rights reserved. This software is furnished under a license and may be used and copied only in accordance with the terms of such license and with the inclusion of the above copyright notice. This software and any copies shall not be provided to any other person. No title to or ownership of the software is hereby transferred. The information in this software is subject to change without notice. DIGITAL assumes no responsibility for the use, functionality or reliability of its software on equipment which is not supplied by DIGITAL. time.h */ #ifndef __TIME_H #define __TIME_H /* Macro Defintions: */ #ifndef __DEFINED_NULL_MACRO #define __DEFINED_NULL_MACRO #define NULL ((void *) 0) #endif #define CLOCKS_PER_SEC ( clock() ) /* Typedef definitions: */ #ifndef __DEFINED_SIZE_T #define __DEFINED_SIZE_T typedef unsigned int size_t; #endif typedef long int clock_t; typedef long int time_t; struct tm { int tm_sec, /* seconds after the minute -- [ 0, 60 ] */ tm_min, /* minutes after the hour -- [ 0, 59 ] */ tm_hour, /* hours since midnight -- [ 0, 23 ] */ tm_mday, /* day of the month -- [ 1, 31 ] */ tm_mon, /* months since January -- [ 0, 11 ] */ tm_year, /* years since 1900 -- [ 0, .. ] */ tm_wday, /* days since Sunday -- [ 0, 6 ] */ tm_yday, /* days since January 1 -- [ 0,365 ] */ tm_isdst; /* Daylight Saving Time Flag-- [-1, 1 ] */ /* -1 info. not available */ /* 0 D.S.T. IS-NOT in effect */ /* 1 D.S.T. IS in effect */ }; /* ** For field 'tm_isdst' */ #define _DST_INFO_NOT_AVAILABLE (-1) #define _DST_IS_NOT_IN_EFFECT (0) #define _DST_IS_IN_EFFECT (1) #ifndef __STDC__ #define CLK_TCK CLOCKS_PER_SEC #define clock C$CLCK #define mktime C$MKTM #define time C$TIME #define asctime C$ASTM #define ctime C$CTIM #define gmtime C$GMTM #define localtime C$LCTM #define strftime C$SFTM #define __tzset C$TZSE #endif #pragma linkage c clock , difftime , mktime , time, asctime, ctime #pragma linkage c gmtime, localtime, strftime, __tzset /* Time Manipulation Functions: */ clock_t clock (void); double difftime (time_t __time1 , time_t __time0 ); time_t mktime (struct tm * __timeptr); time_t time (time_t * __timer); #define difftime(__time1 , __time0) (double)( (__time1) - (__time0) ) /* Time Conversions Functions: */ char *asctime (const struct tm * __timeptr); char *ctime (const time_t * __timer); struct tm *gmtime (const time_t * __timer); struct tm *localtime (const time_t * __timer); size_t strftime (char * __s , size_t __maxsize, const char * __format, const struct tm * __timeptr); void __tzset(int , int ); #endif