scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

time.h (897B)


      1 #ifndef _TIME_H
      2 #define _TIME_H
      3 
      4 #define _NEED_SIZET
      5 #define _NEED_NULL
      6 #include <sys/cdefs.h>
      7 #include <arch/cdefs.h>
      8 #include <arch/time.h>
      9 
     10 typedef long int clock_t;
     11 
     12 struct tm {
     13 	int tm_sec;
     14 	int tm_min;
     15 	int tm_hour;
     16 	int tm_mday;
     17 	int tm_mon;
     18 	int tm_year;
     19 	int tm_wday;
     20 	int tm_yday;
     21 	int tm_isdst;
     22 
     23 	/* fields used internally */
     24 
     25 	char *tm_zone;
     26 	long tm_gmtoff;
     27 };
     28 
     29 extern clock_t clock(void);
     30 extern double difftime(time_t time1, time_t time0);
     31 extern time_t mktime(struct tm *timeptr);
     32 extern time_t time(time_t *timer);
     33 extern char *asctime(const struct tm *timeptr);
     34 extern char *ctime(const time_t *timer);
     35 extern struct tm *gmtime(const time_t *timer);
     36 extern struct tm *localtime(const time_t *timer);
     37 extern size_t strftime(char * restrict s, size_t maxsize,
     38                        const char * restrict format,
     39                        const struct tm * restrict timeptr);
     40 
     41 #endif