From: cuz Date: Tue, 12 Nov 2002 22:01:32 +0000 (+0000) Subject: More time functions X-Git-Tag: V2.12.0~2126 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cae19c1a8a371f5030dbc1770aa497ccbc96c649;p=cc65 More time functions git-svn-id: svn://svn.cc65.org/cc65/trunk@1506 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/include/time.h b/include/time.h index 0c6040dcf..ba0c2c91a 100644 --- a/include/time.h +++ b/include/time.h @@ -49,17 +49,27 @@ typedef unsigned long clock_t; /* Structure for broken down time */ 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; + 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; }; +/* Timezone representation, default is UTC */ +extern struct _timezone { + char daylight; /* True if daylight savings time active */ + long timezone; /* Number of seconds behind UTC */ + char tzname[5]; /* Name of timezone, e.g. CET */ + char dstname[5]; /* Name when daylight true, e.g. CEST */ +} _tz; + + + #if defined(__CBM__) # if defined(__CBM510__) || defined(__CBM610__) /* The 510/610 gets its clock from the AC current */ @@ -81,7 +91,12 @@ unsigned _clocks_per_sec (void); /* Function prototypes */ +char* __fastcall__ asctime (const struct tm* timep); clock_t clock (void); +char* __fastcall__ ctime (const time_t* timep); +struct tm* __fastcall__ gmtime (const time_t* timep); +struct tm* __fastcall__ localtime (const time_t* timep); +time_t __fastcall__ mktime (struct tm* timep); time_t __fastcall__ time (time_t* t);