1 /*----------------------------------------------------------------------- 2 3 File : clb_sysdate.h 4 5 Author: Stephan Schulz 6 7 Contents 8 9 Data types dealing with "dates" and "times". A "time" in this 10 context is a data type with a defined starting point and a total 11 ordering that monotonically increases during the run of the program 12 and can be used to define an order of events. A "date" is a specific 13 element from a "time". 14 15 Copyright 1998, 1999 by the author. 16 This code is released under the GNU General Public Licence and 17 the GNU Lesser General Public License. 18 See the file COPYING in the main E directory for details.. 19 Run "eprover -h" for contact information. 20 21 Changes 22 23 <1> Wed Apr 8 16:49:44 MET DST 1998 24 New 25 26 -----------------------------------------------------------------------*/ 27 28 #ifndef CLB_SYSDATE 29 30 #define CLB_SYSDATE 31 32 #include <stdio.h> 33 #include <limits.h> 34 35 /*---------------------------------------------------------------------*/ 36 /* Data type declarations */ 37 /*---------------------------------------------------------------------*/ 38 39 /* Data type used both for "time" keeping and recording of 40 "dates". */ 41 42 typedef long SysDate; 43 44 /*---------------------------------------------------------------------*/ 45 /* Exported Functions and Variables */ 46 /*---------------------------------------------------------------------*/ 47 48 #define SysDateCreationTime() ((SysDate)0) 49 #define SysDateInvalidTime() ((SysDate)-1) 50 #define SysDateIsInvalid(date) ((date) == SysDateInvalidTime()) 51 #define SysDateInc(sd) ((*(sd))++);assert(*(sd)); 52 #define SysDateIsEarlier(date1, date2) ((date1)<(date2)) 53 #define SysDateEqual(date1, date2) ((date1)==(date2)) 54 void SysDatePrint(FILE* out, SysDate date); 55 #define SysDateMaximum(date1, date2) MAX(date1, date2) 56 #define SysDateIsCreationDate(date) ((date) == SysDateCreationTime()) 57 58 #endif 59 60 /*---------------------------------------------------------------------*/ 61 /* End of File */ 62 /*---------------------------------------------------------------------*/ 63 64 65 66 67 68