Changeset 664fc031 in mainline for uspace/lib/c/generic/time.c


Ignore:
Timestamp:
2012-08-22T18:53:13Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2e6293b
Parents:
077dad2
Message:

rename the new time functions to the time_* naming scheme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/time.c

    r077dad2 r664fc031  
    849849 * @return        EOK or a negative error code
    850850 */
    851 int utctime2tm(const time_t time, struct tm *restrict result)
     851int time_utc2tm(const time_t time, struct tm *restrict result)
    852852{
    853853        assert(result != NULL);
     
    876876 * @return       EOK or a negative error code.
    877877 */
    878 int utctime2str(const time_t time, char *restrict buf)
     878int time_utc2str(const time_t time, char *restrict buf)
    879879{
    880880        struct tm t;
    881881        int r;
    882882
    883         if ((r = utctime2tm(time, &t)) != EOK)
     883        if ((r = time_utc2tm(time, &t)) != EOK)
    884884                return r;
    885885
    886         tm2str(&t, buf);
     886        time_tm2str(&t, buf);
    887887        return EOK;
    888888}
     
    897897 *                bytes long.
    898898 */
    899 void tm2str(const struct tm *restrict timeptr, char *restrict buf)
     899void time_tm2str(const struct tm *restrict timeptr, char *restrict buf)
    900900{
    901901        assert(timeptr != NULL);
     
    927927 * @return          EOK on success or a negative error code.
    928928 */
    929 int localtime2tm(const time_t time, struct tm *restrict result)
     929int time_local2tm(const time_t time, struct tm *restrict result)
    930930{
    931931        // TODO: deal with timezone
     
    957957 * @return       EOK on success or a negative error code.
    958958 */
    959 int localtime2str(const time_t time, char *buf)
     959int time_local2str(const time_t time, char *buf)
    960960{
    961961        struct tm loctime;
    962962        int r;
    963963
    964         if ((r = localtime2tm(time, &loctime)) != EOK)
     964        if ((r = time_local2tm(time, &loctime)) != EOK)
    965965                return r;
    966966
    967         tm2str(&loctime, buf);
     967        time_tm2str(&loctime, buf);
    968968
    969969        return EOK;
Note: See TracChangeset for help on using the changeset viewer.