scc

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

time.h (890B)


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