1 #ifndef CLOCK_H 2 #define CLOCK_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif /* __cplusplus */ 7 8 #include "type.h" 9 10 #define PERIOD_YEARS 146097L 11 #define SEC_DAY 86400L 12 #define ISLEAPYEAR(y) (((y)%400 == 0) || (((y)%4 == 0) && ((y)%100 != 0))) 13 14 void Clock_Epoch2YearDay (sInt4 totDay, int *Day, sInt4 * Yr); 15 int Clock_MonthNum (int day, sInt4 year); 16 int Clock_NumDay (int month, int day, sInt4 year, char f_tot); 17 sChar Clock_GetTimeZone (void); 18 int Clock_IsDaylightSaving2 (double clock, sChar TimeZone); 19 void Clock_PrintDate (double clock, sInt4 *year, int *month, int *day, 20 int *hour, int *min, double *sec); 21 void Clock_Print (char *buffer, int n, double clock, const char *format, 22 char f_gmt); 23 void Clock_Print2 (char *buffer, int n, double clock, char *format, 24 sChar timeZone, sChar f_dayCheck); 25 double Clock_Clicks (void); 26 int Clock_SetSeconds (double *time, sChar f_set); 27 double Clock_Seconds (void); 28 int Clock_PrintZone2 (char *ptr, sChar TimeZone, char f_day); 29 int Clock_ScanZone2 (char *ptr, sChar * TimeZone, char *f_day); 30 int Clock_ScanMonth (char *ptr); 31 void Clock_PrintMonth3 (int mon, char *buffer, int buffLen); 32 void Clock_PrintMonth (int mon, char *buffer, int buffLen); 33 void Clock_ScanDate (double *clock, sInt4 year, int mon, int day); 34 int Clock_ScanDateNumber (double *clock, char *buffer); 35 void Clock_PrintDateNumber (double clock, char buffer[15]); 36 37 int Clock_Scan (double *clock, char *buffer, char f_gmt); 38 double Clock_AddMonthYear (double refTime, int incrMonth, int incrYear); 39 40 #ifdef __cplusplus 41 } 42 #endif /* __cplusplus */ 43 44 #endif /* CLOCK_H */ 45