Searched refs:result_ts (Results 1 – 1 of 1) sorted by relevance
63 static bool ComputeRelativeTimeSpec(timespec* result_ts, const timespec& lhs, const timespec& rhs) { in ComputeRelativeTimeSpec() argument65 result_ts->tv_sec = lhs.tv_sec - rhs.tv_sec; in ComputeRelativeTimeSpec()66 result_ts->tv_nsec = lhs.tv_nsec - rhs.tv_nsec; in ComputeRelativeTimeSpec()67 if (result_ts->tv_nsec < 0) { in ComputeRelativeTimeSpec()68 result_ts->tv_sec--; in ComputeRelativeTimeSpec()69 result_ts->tv_nsec += one_sec; in ComputeRelativeTimeSpec()70 } else if (result_ts->tv_nsec > one_sec) { in ComputeRelativeTimeSpec()71 result_ts->tv_sec++; in ComputeRelativeTimeSpec()72 result_ts->tv_nsec -= one_sec; in ComputeRelativeTimeSpec()74 return result_ts->tv_sec < 0; in ComputeRelativeTimeSpec()