am 60bc9090: Merge "Add timespec/timeval conversion helpers."

* commit '60bc90909a49121789bf86f5d14f63967e8000e0':
  Add timespec/timeval conversion helpers.
This commit is contained in:
Bertrand SIMONNET 2015-07-16 22:25:25 +00:00 committed by Android Git Automerger
commit df6eee9f85

View File

@ -73,6 +73,15 @@ extern int utimes(const char *, const struct timeval *);
} \
} while (0)
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
(ts)->tv_sec = (tv)->tv_sec; \
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
}
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
(tv)->tv_sec = (ts)->tv_sec; \
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
}
__END_DECLS
#endif /* _SYS_TIME_H_ */