Searched refs:result_ts (Results 1 – 1 of 1) sorted by relevance
49 static bool ComputeRelativeTimeSpec(timespec* result_ts, const timespec& lhs, const timespec& rhs) { in ComputeRelativeTimeSpec() argument51 result_ts->tv_sec = lhs.tv_sec - rhs.tv_sec; in ComputeRelativeTimeSpec()52 result_ts->tv_nsec = lhs.tv_nsec - rhs.tv_nsec; in ComputeRelativeTimeSpec()53 if (result_ts->tv_nsec < 0) { in ComputeRelativeTimeSpec()54 result_ts->tv_sec--; in ComputeRelativeTimeSpec()55 result_ts->tv_nsec += one_sec; in ComputeRelativeTimeSpec()56 } else if (result_ts->tv_nsec > one_sec) { in ComputeRelativeTimeSpec()57 result_ts->tv_sec++; in ComputeRelativeTimeSpec()58 result_ts->tv_nsec -= one_sec; in ComputeRelativeTimeSpec()60 return result_ts->tv_sec < 0; in ComputeRelativeTimeSpec()