Searched refs:result_ts (Results 1 – 1 of 1) sorted by relevance
89 static bool ComputeRelativeTimeSpec(timespec* result_ts, const timespec& lhs, const timespec& rhs) { in ComputeRelativeTimeSpec() argument91 result_ts->tv_sec = lhs.tv_sec - rhs.tv_sec; in ComputeRelativeTimeSpec()92 result_ts->tv_nsec = lhs.tv_nsec - rhs.tv_nsec; in ComputeRelativeTimeSpec()93 if (result_ts->tv_nsec < 0) { in ComputeRelativeTimeSpec()94 result_ts->tv_sec--; in ComputeRelativeTimeSpec()95 result_ts->tv_nsec += one_sec; in ComputeRelativeTimeSpec()96 } else if (result_ts->tv_nsec > one_sec) { in ComputeRelativeTimeSpec()97 result_ts->tv_sec++; in ComputeRelativeTimeSpec()98 result_ts->tv_nsec -= one_sec; in ComputeRelativeTimeSpec()100 return result_ts->tv_sec < 0; in ComputeRelativeTimeSpec()