30 TEST(Time, clockGettimeRealtimeAreWithin120SecsOfStdChronoSystemClock) {
36 std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec);
37 auto stdChronoSystemClockNow =
45 #ifdef CLOCK_MONOTONIC 47 TEST(Time, clockGettimeMonotonicAreWithin120SecsOfStdChronoSteadyClock) {
53 std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec);
54 auto stdChronoSteadyClockNow =
62 #ifdef CLOCK_PROCESS_CPUTIME_ID 64 TEST(Time, clockGettimeProcessCputimeIsGreaterThanZero) {
70 std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec);
72 ASSERT_GT(gettimeResult, std::chrono::nanoseconds::zero());
77 #ifdef CLOCK_THREAD_CPUTIME_ID 79 TEST(Time, clockGettimeProcessThreadTimeIsGreaterThanZero) {
85 std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec);
87 ASSERT_GT(gettimeResult, std::chrono::nanoseconds::zero());
#define ASSERT_GT(val1, val2)
::testing::AssertionResult AreWithinSecs(T1 val1, T2 val2, std::chrono::seconds acceptableDeltaSecs)
int(* clock_gettime)(clockid_t, timespec *ts)
#define ASSERT_EQ(val1, val2)
std::chrono::steady_clock::time_point now()
TEST(TimeTest, GetDateTimeStr)
#define ASSERT_TRUE(condition)
static constexpr auto kAcceptableDeltaSecs