Searched refs:result_ts (Results 1 – 1 of 1) sorted by relevance
65 static bool ComputeRelativeTimeSpec(timespec* result_ts, const timespec& lhs, const timespec& rhs) { in ComputeRelativeTimeSpec() argument67 static_assert(std::is_signed<decltype(result_ts->tv_sec)>::value); // Signed on Linux. in ComputeRelativeTimeSpec()68 result_ts->tv_sec = lhs.tv_sec - rhs.tv_sec; in ComputeRelativeTimeSpec()69 result_ts->tv_nsec = lhs.tv_nsec - rhs.tv_nsec; in ComputeRelativeTimeSpec()70 if (result_ts->tv_nsec < 0) { in ComputeRelativeTimeSpec()71 result_ts->tv_sec--; in ComputeRelativeTimeSpec()72 result_ts->tv_nsec += one_sec; in ComputeRelativeTimeSpec()74 DCHECK(result_ts->tv_nsec >= 0 && result_ts->tv_nsec < one_sec); in ComputeRelativeTimeSpec()75 return result_ts->tv_sec >= 0; in ComputeRelativeTimeSpec()