/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * E U R O G A M H I G H V O L T A G E C O N T R O L * * * * File: gtime.h * * * * Purpose: Timer related constants and types * * * * Author(s): Jomar Honsi Date: 18/03/91 * * * * Revision record: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef INCtime #define INCtime #define ENDTIME (-1) #define TIMEOUT (-1) #define GREGORIAN 0 #define JULIAN 1 #define HDAY 24 #define MHOUR 60 #define SMIN 60 #define SDAY HDAY*MHOUR*SMIN #define CENTURY 1900 #define S_DSTR 10 typedef char TimeSbuf[S_DSTR]; /* time conversion macros (from/to 00HHMMSS and 00YYMMDD format) */ #define ltime(h,m) ( (h)*0x10000+(m)*0x100 ) #define lsec(l) ( (l)&0xFF) #define lmin(l) ( ((l)>>8)&0xFF) #define lhour(l) ( ((l)>>16)&0xFF) #define lday(l) ( (l)&0xFF) #define lmonth(l) ( ((l)>>8)&0xFF) #define lyear(l) ( ((l)>>16)&0xFF) typedef long Ltime; /* Time on form 00HHMMSS */ typedef double Jtime; /* Julian time variable */ typedef struct { Ltime gdate, gtime, jdate, jtime; Jtime now; } TimeStruct; #endif