scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

time.h (825B)


      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 
     26 extern clock_t clock(void);
     27 extern double difftime(time_t time1, time_t time0);
     28 extern time_t mktime(struct tm *timeptr);
     29 extern time_t time(time_t *timer);
     30 extern char *asctime(const struct tm *timeptr);
     31 extern char *ctime(const time_t *timer);
     32 extern struct tm *gmtime(const time_t *timer);
     33 extern struct tm *localtime(const time_t *timer);
     34 extern size_t strftime(char * restrict s, size_t maxsize,
     35                        const char * restrict format,
     36                        const struct tm * restrict timeptr);
     37 
     38 #endif