Changeset 4cade47 in mainline for uspace/lib/posix/time.h


Ignore:
Timestamp:
2012-04-23T20:32:12Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3293a94, cb948777
Parents:
86e81a9 (diff), f8b6d34c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

cherry-pick changes from the time-helenos branch

File:
1 edited

Legend:

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

    r86e81a9 r4cade47  
    6969#define CLOCK_REALTIME ((posix_clockid_t) 0)
    7070
    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 
    8371struct posix_timespec {
    8472        time_t tv_sec; /* Seconds. */
     
    10391
    10492/* 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);
     93extern time_t posix_mktime(struct tm *tm);
     94extern struct tm *posix_gmtime(const time_t *timer);
     95extern struct tm *posix_gmtime_r(const time_t *restrict timer,
     96    struct tm *restrict result);
     97extern struct tm *posix_localtime(const time_t *timer);
     98extern struct tm *posix_localtime_r(const time_t *restrict timer,
     99    struct tm *restrict result);
    112100
    113101/* 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,
     102extern char *posix_asctime(const struct tm *timeptr);
     103extern char *posix_asctime_r(const struct tm *restrict timeptr,
    116104    char *restrict buf);
    117105extern char *posix_ctime(const time_t *timer);
    118106extern char *posix_ctime_r(const time_t *timer, char *buf);
    119107extern size_t posix_strftime(char *restrict s, size_t maxsize,
    120     const char *restrict format, const struct posix_tm *restrict tm);
     108    const char *restrict format, const struct tm *restrict tm);
    121109
    122110/* Clocks */
     
    134122
    135123#ifndef LIBPOSIX_INTERNAL
    136         #define tm posix_tm
    137124        #define timespec posix_timespec
    138125        #define itimerspec posix_itimerspec
Note: See TracChangeset for help on using the changeset viewer.