scc

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

time.h (773B)


      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 struct tm {
     11 	int tm_sec;
     12 	int tm_min;
     13 	int tm_hour;
     14 	int tm_mday;
     15 	int tm_mon;
     16 	int tm_year;
     17 	int tm_wday;
     18 	int tm_yday;
     19 	int tm_isdst;
     20 
     21 	/* fields used internally */
     22 
     23 	char *tm_zone;
     24 	long tm_gmtoff;
     25 };
     26 
     27 extern clock_t clock(void);
     28 extern double difftime(time_t, time_t);
     29 extern time_t mktime(struct tm *);
     30 extern time_t time(time_t *);
     31 extern char *asctime(const struct tm *);
     32 extern char *ctime(const time_t *);
     33 extern struct tm *gmtime(const time_t *);
     34 extern struct tm *localtime(const time_t *);
     35 extern size_t strftime(char *restrict, size_t, const char *restrict,
     36                        const struct tm *restrict);
     37 
     38 #endif