Changeset 7f9d97f3 in mainline for uspace/lib/c/include/sys/time.h


Ignore:
Timestamp:
2015-03-14T21:48:01Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
270bf4f
Parents:
c0c38c7c
Message:

Make gettimeofday() return the actual microseconds.

Enhance struct tm to also have a field to hold microseconds and make
sure that this information propagates from the RTC driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/sys/time.h

    rc0c38c7c r7f9d97f3  
    5050
    5151struct tm {
     52        int tm_usec;   /* Microseconds [0,999999]. */
    5253        int tm_sec;    /* Seconds [0,60]. */
    5354        int tm_min;    /* Minutes [0,59]. */
     
    7172};
    7273
    73 extern void tv_add(struct timeval *, suseconds_t);
    74 extern suseconds_t tv_sub(struct timeval *, struct timeval *);
     74extern void tv_add_diff(struct timeval *, suseconds_t);
     75extern void tv_add(struct timeval *, struct timeval *);
     76extern suseconds_t tv_sub_diff(struct timeval *, struct timeval *);
     77extern void tv_sub(struct timeval *, struct timeval *);
    7578extern int tv_gt(struct timeval *, struct timeval *);
    7679extern int tv_gteq(struct timeval *, struct timeval *);
     
    8588extern int time_utc2str(const time_t, char *);
    8689extern void time_tm2str(const struct tm *, char *);
     90extern int time_tv2tm(const struct timeval *, struct tm *);
    8791extern int time_local2tm(const time_t, struct tm *);
    8892extern int time_local2str(const time_t, char *);
Note: See TracChangeset for help on using the changeset viewer.