Changes in uspace/lib/posix/time.h [9d58539:d3e3a71] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/time.h
r9d58539 rd3e3a71 63 63 #endif 64 64 65 #undef ASCTIME_BUF_LEN66 #define ASCTIME_BUF_LEN 2667 68 65 #undef CLOCK_REALTIME 69 66 #define CLOCK_REALTIME ((posix_clockid_t) 0) 70 71 struct posix_tm {72 int tm_sec; /* Seconds [0,60]. */73 int tm_min; /* Minutes [0,59]. */74 int tm_hour; /* Hour [0,23]. */75 int tm_mday; /* Day of month [1,31]. */76 int tm_mon; /* Month of year [0,11]. */77 int tm_year; /* Years since 1900. */78 int tm_wday; /* Day of week [0,6] (Sunday = 0). */79 int tm_yday; /* Day of year [0,365]. */80 int tm_isdst; /* Daylight Savings flag. */81 };82 67 83 68 struct posix_timespec { … … 99 84 extern void posix_tzset(void); 100 85 101 /* Elapsed Time */102 extern double posix_difftime(time_t time1, time_t time0);103 104 86 /* Broken-down Time */ 105 extern time_t posix_mktime(struct posix_tm *tm); 106 extern struct posix_tm *posix_gmtime(const time_t *timer); 107 extern struct posix_tm *posix_gmtime_r(const time_t *restrict timer, 108 struct posix_tm *restrict result); 109 extern struct posix_tm *posix_localtime(const time_t *timer); 110 extern struct posix_tm *posix_localtime_r(const time_t *restrict timer, 111 struct posix_tm *restrict result); 87 extern struct tm *posix_gmtime_r(const time_t *restrict timer, 88 struct tm *restrict result); 89 extern struct tm *posix_localtime_r(const time_t *restrict timer, 90 struct tm *restrict result); 112 91 113 92 /* Formatting Calendar Time */ 114 extern char *posix_asctime(const struct posix_tm *timeptr); 115 extern char *posix_asctime_r(const struct posix_tm *restrict timeptr, 93 extern char *posix_asctime_r(const struct tm *restrict timeptr, 116 94 char *restrict buf); 117 extern char *posix_ctime(const time_t *timer);118 95 extern char *posix_ctime_r(const time_t *timer, char *buf); 119 extern size_t posix_strftime(char *restrict s, size_t maxsize,120 const char *restrict format, const struct posix_tm *restrict tm);121 96 122 97 /* Clocks */ … … 134 109 135 110 #ifndef LIBPOSIX_INTERNAL 136 #define tm posix_tm137 111 #define timespec posix_timespec 138 112 #define itimerspec posix_itimerspec … … 144 118 #define tzset posix_tzset 145 119 146 #define difftime posix_difftime147 148 #define mktime posix_mktime149 #define gmtime posix_gmtime150 120 #define gmtime_r posix_gmtime_r 151 #define localtime posix_localtime152 121 #define localtime_r posix_localtime_r 153 122 154 #define asctime posix_asctime155 123 #define asctime_r posix_asctime_r 156 #define ctime posix_ctime157 124 #define ctime_r posix_ctime_r 158 #define strftime posix_strftime159 125 160 126 #define clock_getres posix_clock_getres
Note:
See TracChangeset
for help on using the changeset viewer.