3 * - By John Hodge (thePowersGang)
11 #include <sys/types.h> // time_t
12 #include <stddef.h> // size_t
21 int tm_year; // 1900 based
27 #define CLOCKS_PER_SEC 1000
29 typedef signed long long clock_t;
31 //! Processor time used since invocation
32 extern clock_t clock(void);
34 //! Difference between two times in seconds
35 extern double difftime(time_t time1, time_t time0);
37 //! Convert a local time into the format returned by \a time
38 //! \note Also updates tm_wday and tm_yday to the correct values
39 extern time_t mktime(struct tm *timeptr);
41 //! Get the current calendar time
42 //! \note -1 is returned if the calendar time is not avaliable
43 extern time_t time(time_t *t);
48 //! Convert the time structure into a string of form 'Sun Sep 16 01:03:52 1973\n\0'
49 extern char *asctime(const struct tm *timeptr);
51 //! asctime(localtime(timer))
52 extern char *ctime(const time_t *timer);
54 //! Convert \a timter into UTC
55 extern struct tm *gmtime(const time_t *timer);
57 extern struct tm *localtime(const time_t *timer);
59 extern size_t strftime(char*restrict s, size_t maxsize, const char*restrict format, const struct tm*restrict timeptr);
61 #include <libposix_time.h>