summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/freebsd/sys/timespec.h
blob: 4ec4147eef4766b81bb70c1ca151b507695d3c72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#define TIMEVAL_TO_TIMESPEC(tv, ts)                                     \
        do {                                                            \
                (ts)->tv_sec = (tv)->tv_sec;                            \
                (ts)->tv_nsec = (tv)->tv_usec * 1000;                   \
        } while (0)
#define TIMESPEC_TO_TIMEVAL(tv, ts)                                     \
        do {                                                            \
                (tv)->tv_sec = (ts)->tv_sec;                            \
                (tv)->tv_usec = (ts)->tv_nsec / 1000;                   \
        } while (0)