Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/time.h

    rf8b6d34c r55b1efd  
    6969#define CLOCK_REALTIME ((posix_clockid_t) 0)
    7070
     71struct 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
    7183struct posix_timespec {
    7284        time_t tv_sec; /* Seconds. */
     
    91103
    92104/* Broken-down Time */
    93 extern time_t posix_mktime(struct tm *tm);
    94 extern struct tm *posix_gmtime(const time_t *timer);
    95 extern struct tm *posix_gmtime_r(const time_t *restrict timer,
    96     struct tm *restrict result);
    97 extern struct tm *posix_localtime(const time_t *timer);
    98 extern struct tm *posix_localtime_r(const time_t *restrict timer,
    99     struct tm *restrict result);
     105extern time_t posix_mktime(struct posix_tm *tm);
     106extern struct posix_tm *posix_gmtime(const time_t *timer);
     107extern struct posix_tm *posix_gmtime_r(const time_t *restrict timer,
     108    struct posix_tm *restrict result);
     109extern struct posix_tm *posix_localtime(const time_t *timer);
     110extern struct posix_tm *posix_localtime_r(const time_t *restrict timer,
     111    struct posix_tm *restrict result);
    100112
    101113/* Formatting Calendar Time */
    102 extern char *posix_asctime(const struct tm *timeptr);
    103 extern char *posix_asctime_r(const struct tm *restrict timeptr,
     114extern char *posix_asctime(const struct posix_tm *timeptr);
     115extern char *posix_asctime_r(const struct posix_tm *restrict timeptr,
    104116    char *restrict buf);
    105117extern char *posix_ctime(const time_t *timer);
    106118extern char *posix_ctime_r(const time_t *timer, char *buf);
    107119extern size_t posix_strftime(char *restrict s, size_t maxsize,
    108     const char *restrict format, const struct tm *restrict tm);
     120    const char *restrict format, const struct posix_tm *restrict tm);
    109121
    110122/* Clocks */
     
    122134
    123135#ifndef LIBPOSIX_INTERNAL
     136        #define tm posix_tm
    124137        #define timespec posix_timespec
    125138        #define itimerspec posix_itimerspec
Note: See TracChangeset for help on using the changeset viewer.