|
时间转换函数:
hrtime_t timespec_to_ns(const struct timespec *ts); /* timespec到纳秒数转换 */
struct timespec timespec_from_ns(hrtime_t t); /* 纳秒数到timespec转换 */
const struct timespec * hrt2ts(hrtime_t value);
还有一个含有这个函数的程序是
clock_nanosleep (CLOCK_REALTIME, TIMER_ABSTIME, hrt2ts(expected - advance), NULL);
哪位知道,告诉小弟一下,谢了! |
|