Lines Matching refs:TimeTicks
821 TEST(TimeTicks, Deltas) { in TEST() argument
823 TimeTicks ticks_start = TimeTicks::Now(); in TEST()
825 TimeTicks ticks_stop = TimeTicks::Now(); in TEST()
848 static void HighResClockTest(TimeTicks (*GetTicks)()) { in HighResClockTest()
851 if (!TimeTicks::IsHighResolution()) in HighResClockTest()
868 TimeTicks ticks_start = GetTicks(); in HighResClockTest()
885 TEST(TimeTicks, HighRes) { in TEST() argument
886 HighResClockTest(&TimeTicks::Now); in TEST()
891 static TimeTicks Now() { in Now()
896 static TimeTicks now_ticks_;
900 TimeTicks TimeTicksOverride::now_ticks_;
902 TEST(TimeTicks, NowOverride) { in TEST() argument
903 TimeTicksOverride::now_ticks_ = TimeTicks::Min(); in TEST()
906 EXPECT_LT(TimeTicks::Min(), TimeTicks::UnixEpoch()); in TEST()
907 EXPECT_LT(TimeTicks::UnixEpoch(), TimeTicks::Now()); in TEST()
908 EXPECT_GT(TimeTicks::Max(), TimeTicks::Now()); in TEST()
909 EXPECT_LT(TimeTicks::UnixEpoch(), subtle::TimeTicksNowIgnoringOverride()); in TEST()
910 EXPECT_GT(TimeTicks::Max(), subtle::TimeTicksNowIgnoringOverride()); in TEST()
918 EXPECT_EQ(TimeTicks::Min() + TimeDelta::FromSeconds(1), TimeTicks::Now()); in TEST()
919 EXPECT_EQ(TimeTicks::Min() + TimeDelta::FromSeconds(2), TimeTicks::Now()); in TEST()
922 EXPECT_LT(TimeTicks::UnixEpoch(), subtle::TimeTicksNowIgnoringOverride()); in TEST()
923 EXPECT_GT(TimeTicks::Max(), subtle::TimeTicksNowIgnoringOverride()); in TEST()
926 EXPECT_EQ(TimeTicks::Min() + TimeDelta::FromSeconds(3), TimeTicks::Now()); in TEST()
930 EXPECT_LT(TimeTicks::UnixEpoch(), TimeTicks::Now()); in TEST()
931 EXPECT_GT(TimeTicks::Max(), TimeTicks::Now()); in TEST()
932 EXPECT_LT(TimeTicks::UnixEpoch(), subtle::TimeTicksNowIgnoringOverride()); in TEST()
933 EXPECT_GT(TimeTicks::Max(), subtle::TimeTicksNowIgnoringOverride()); in TEST()
995 TimeTicks begin = TimeTicks::Now(); in TEST()
1002 TimeTicks end = TimeTicks::Now(); in TEST()
1013 TEST(TimeTicks, SnappedToNextTickBasic) { in TEST() argument
1014 base::TimeTicks phase = base::TimeTicks::FromInternalValue(4000); in TEST()
1016 base::TimeTicks timestamp; in TEST()
1019 timestamp = base::TimeTicks::FromInternalValue(3500); in TEST()
1024 timestamp = base::TimeTicks::FromInternalValue(4500); in TEST()
1029 timestamp = base::TimeTicks::FromInternalValue(2500); in TEST()
1034 timestamp = base::TimeTicks::FromInternalValue(6500); in TEST()
1039 timestamp = base::TimeTicks::FromInternalValue(3000); in TEST()
1044 timestamp = base::TimeTicks::FromInternalValue(5000); in TEST()
1049 timestamp = base::TimeTicks::FromInternalValue(4000); in TEST()
1054 TEST(TimeTicks, SnappedToNextTickOverflow) { in TEST() argument
1057 base::TimeTicks phase = base::TimeTicks::FromInternalValue(0); in TEST()
1059 base::TimeTicks big_timestamp = in TEST()
1060 base::TimeTicks::FromInternalValue(8635916564000); in TEST()
1070 TEST(TimeTicks, Android_FromUptimeMillis_ClocksMatch) { in TEST() argument
1081 const TimeTicks lower_bound_ticks = in TEST()
1082 TimeTicks::Now() - TimeDelta::FromMilliseconds(1); in TEST()
1083 const TimeTicks converted_ticks = TimeTicks::FromUptimeMillis( in TEST()
1085 const TimeTicks upper_bound_ticks = TimeTicks::Now(); in TEST()
1523 EXPECT_TRUE((large_delta + TimeTicks::Now()).is_max()); in TEST()
1525 EXPECT_TRUE((TimeTicks::Now() + large_delta).is_max()); in TEST()
1531 TimeTicks ticks_now = TimeTicks::Now(); in TEST()
1592 DCHECK_EQ(TimeTicks(), TimeTicks()); in TEST()
1596 TimeTicks zero; in TEST()
1601 TimeTicks forty_years_later = in TEST()
1602 TimeTicks() + TimeDelta::FromDays(365.25 * 40); in TEST()
1610 oss << TimeTicks(); in TEST()
1616 oss << TimeTicks(); in TEST()