Home
last modified time | relevance | path

Searched refs:Time (Results 1 – 25 of 91) sorted by relevance

1234

/system/chre/util/tests/
Dtime_test.cc32 TEST(Time, CheckTimeConversionConstants) { in TEST() argument
40 TEST(Time, ConvertSecToNanosec) { in TEST() argument
45 TEST(Time, ConvertSecToNanosecOverflowIsUint64Max) { in TEST() argument
50 TEST(Time, ConvertSecToMillisec) { in TEST() argument
55 TEST(Time, ConvertSecToMillisecOverflowIsUint64Max) { in TEST() argument
61 TEST(Time, DefaultMillisecIsZero) { in TEST() argument
66 TEST(Time, GetInitialMillisec) { in TEST() argument
71 TEST(Time, InitializeMillisecFromNanosec) { in TEST() argument
77 TEST(Time, ConcertMillisecToMicrosec) { in TEST() argument
82 TEST(Time, ConvertMillisecToMicrosecOverflowIsUint64Max) { in TEST() argument
[all …]
/system/update_engine/common/
Dclock.cc23 base::Time Clock::GetWallclockTime() { in GetWallclockTime()
24 return base::Time::Now(); in GetWallclockTime()
27 base::Time Clock::GetMonotonicTime() { in GetMonotonicTime()
35 return base::Time(); in GetMonotonicTime()
39 now_tv.tv_usec = now_ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond; in GetMonotonicTime()
40 return base::Time::FromTimeVal(now_tv); in GetMonotonicTime()
43 base::Time Clock::GetBootTime() { in GetBootTime()
50 return base::Time(); in GetBootTime()
54 now_tv.tv_usec = now_ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond; in GetBootTime()
55 return base::Time::FromTimeVal(now_tv); in GetBootTime()
Dfake_clock.h29 base::Time GetWallclockTime() override { return wallclock_time_; } in GetWallclockTime()
31 base::Time GetMonotonicTime() override { return monotonic_time_; } in GetMonotonicTime()
33 base::Time GetBootTime() override { return boot_time_; } in GetBootTime()
35 void SetWallclockTime(const base::Time& time) { wallclock_time_ = time; } in SetWallclockTime()
37 void SetMonotonicTime(const base::Time& time) { monotonic_time_ = time; } in SetMonotonicTime()
39 void SetBootTime(const base::Time& time) { boot_time_ = time; } in SetBootTime()
42 base::Time wallclock_time_;
43 base::Time monotonic_time_;
44 base::Time boot_time_;
Dclock_interface.h35 virtual base::Time GetWallclockTime() = 0;
42 virtual base::Time GetMonotonicTime() = 0;
49 virtual base::Time GetBootTime() = 0;
Dclock.h29 base::Time GetWallclockTime() override;
31 base::Time GetMonotonicTime() override;
33 base::Time GetBootTime() override;
/system/update_engine/update_manager/
Dreal_time_provider_unittest.cc28 using base::Time;
44 Time CurrTime() { in CurrTime()
45 Time::Exploded now_exp; in CurrTime()
54 Time time; in CurrTime()
55 ignore_result(Time::FromLocalExploded(now_exp, &time)); in CurrTime()
64 const Time now = CurrTime(); in TEST_F()
65 Time::Exploded exploded; in TEST_F()
71 Time expected; in TEST_F()
72 ignore_result(Time::FromLocalExploded(exploded, &expected)); in TEST_F()
79 const Time now = CurrTime(); in TEST_F()
[all …]
Dpolicy_test_utils.cc25 using base::Time;
48 fake_clock_.SetMonotonicTime(Time::FromInternalValue(12345678L)); in SetUpDefaultClock()
49 fake_clock_.SetWallclockTime(Time::FromInternalValue(12345678901234L)); in SetUpDefaultClock()
53 Time current_time = fake_clock_.GetWallclockTime(); in SetUpDefaultTimeProvider()
54 base::Time::Exploded exploded; in SetUpDefaultTimeProvider()
60 new Time(current_time.LocalMidnight())); in SetUpDefaultTimeProvider()
65 new Time(fake_clock_.GetWallclockTime())); in SetUpDefaultState()
67 new Time(fake_clock_.GetWallclockTime())); in SetUpDefaultState()
82 Time first_seen_time = fake_clock_.GetWallclockTime() - first_seen_period; in GetDefaultUpdateState()
93 update_state.failures_last_updated = Time(); // Needs to be zero. in GetDefaultUpdateState()
[all …]
Dreal_time_provider.cc25 using base::Time;
33 class CurrDateVariable : public Variable<Time> {
38 : Variable<Time>(name, TimeDelta::FromHours(1)), clock_(clock) {} in CurrDateVariable()
41 virtual const Time* GetValue(TimeDelta /* timeout */, string* /* errmsg */) { in GetValue()
42 Time::Exploded now_exp; in GetValue()
45 Time* now = new Time(); in GetValue()
46 bool success = Time::FromLocalExploded(now_exp, now); in GetValue()
67 Time::Exploded exploded; in GetValue()
85 Time::Exploded exploded; in GetValue()
Devaluation_context.h92 bool IsWallclockTimeGreaterThan(base::Time timestamp);
93 bool IsMonotonicTimeGreaterThan(base::Time timestamp);
146 base::TimeDelta RemainingTime(base::Time monotonic_deadline) const;
150 base::Time MonotonicDeadline(base::TimeDelta timeout);
182 base::Time evaluation_start_wallclock_;
183 base::Time evaluation_start_monotonic_;
191 base::Time reevaluation_time_wallclock_;
192 base::Time reevaluation_time_monotonic_;
199 base::Time evaluation_monotonic_deadline_;
205 base::Time expiration_monotonic_deadline_;
Dupdate_time_restrictions_policy_impl_unittest.cc26 using base::Time;
52 void TestPolicy(const Time::Exploded& exploded, in TestPolicy()
61 Time time; in TestPolicy()
62 EXPECT_TRUE(Time::FromLocalExploded(exploded, &time)); in TestPolicy()
79 Time::Exploded random_time{2018, 7, 1, 9, 12, 30, 0, 0}; in TEST_F()
89 Time::Exploded first_interval_time{2018, 7, 1, 9, 12, 30, 0, 0}; in TEST_F()
97 Time::Exploded second_interval_time{2018, 7, 4, 12, 4, 30, 0, 0}; in TEST_F()
106 Time::Exploded out_of_range_time{2018, 7, 1, 9, 18, 30, 0, 0}; in TEST_F()
114 Time::Exploded in_range_time{2018, 7, 1, 9, 12, 30, 0, 0}; in TEST_F()
Devaluation_context.cc34 using base::Time;
46 bool IsTimeGreaterThanHelper(Time ref_time, Time curr_time, Time* reeval_time) { in IsTimeGreaterThanHelper()
57 TimeDelta GetTimeout(Time curr, Time expires) { in GetTimeout()
98 TimeDelta EvaluationContext::RemainingTime(Time monotonic_deadline) const { in RemainingTime()
105 Time EvaluationContext::MonotonicDeadline(TimeDelta timeout) { in MonotonicDeadline()
106 return (timeout.is_max() ? Time::Max() in MonotonicDeadline()
131 bool EvaluationContext::IsWallclockTimeGreaterThan(Time timestamp) { in IsWallclockTimeGreaterThan()
136 bool EvaluationContext::IsMonotonicTimeGreaterThan(Time timestamp) { in IsMonotonicTimeGreaterThan()
144 reevaluation_time_wallclock_ = Time::Max(); in ResetEvaluation()
145 reevaluation_time_monotonic_ = Time::Max(); in ResetEvaluation()
Dnext_update_check_policy_impl_unittest.cc23 using base::Time;
50 Time next_update_check; in TEST_F()
55 new Time(fake_clock_.GetWallclockTime() - TimeDelta::FromMinutes(10))); in TEST_F()
72 Time next_update_check; in TEST_F()
94 Time next_update_check; in TEST_F()
118 Time next_update_check; in TEST_F()
141 Time next_update_check; in TEST_F()
Dfake_updater_provider.h32 FakeVariable<base::Time>* var_updater_started_time() override { in var_updater_started_time()
36 FakeVariable<base::Time>* var_last_checked_time() override { in var_last_checked_time()
40 FakeVariable<base::Time>* var_update_completed_time() override { in var_update_completed_time()
87 FakeVariable<base::Time> var_updater_started_time_{"updater_started_time",
89 FakeVariable<base::Time> var_last_checked_time_{"last_checked_time",
91 FakeVariable<base::Time> var_update_completed_time_{"update_completed_time",
Dandroid_things_policy_unittest.cc24 using base::Time;
51 Time next_update_check; in SetUpdateCheckAllowed()
56 Time curr_time = next_update_check; in SetUpdateCheckAllowed()
69 Time next_update_check; in TEST_F()
70 Time last_checked_time = in TEST_F()
75 new Time(last_checked_time)); in TEST_F()
85 new Time(last_checked_time)); in TEST_F()
95 new Time(last_checked_time)); in TEST_F()
Dupdate_manager_unittest.cc45 using base::Time;
60 Time FixedTime() { in FixedTime()
61 Time::Exploded now_exp; in FixedTime()
70 Time time; in FixedTime()
71 ignore_result(Time::FromLocalExploded(now_exp, &time)); in FixedTime()
143 DelayPolicy(int sleep_secs, Time time_threshold, int* num_called_p) in DelayPolicy()
160 if (time_threshold_ < Time::Max() && in UpdateCheckAllowed()
172 Time time_threshold_;
202 update_state.failures_last_updated = Time(); in TEST_F()
208 update_state.p2p_first_attempted = Time(); in TEST_F()
[all …]
Dreal_updater_provider.h43 Variable<base::Time>* var_updater_started_time() override { in var_updater_started_time()
47 Variable<base::Time>* var_last_checked_time() override { in var_last_checked_time()
51 Variable<base::Time>* var_update_completed_time() override { in var_update_completed_time()
102 ConstCopyVariable<base::Time> var_updater_started_time_;
103 std::unique_ptr<Variable<base::Time>> var_last_checked_time_;
104 std::unique_ptr<Variable<base::Time>> var_update_completed_time_;
Ddefault_policy.h42 return last_check_allowed_time_ != base::Time::Max(); in IsLastCheckAllowedTimeSet()
47 void set_last_check_allowed_time(base::Time timestamp) { in set_last_check_allowed_time()
50 base::Time last_check_allowed_time() const { in last_check_allowed_time()
55 base::Time last_check_allowed_time_ = base::Time::Max();
Dreal_updater_provider_unittest.cc33 using base::Time;
50 Time FixedTime() { in FixedTime()
51 Time::Exploded now_exp; in FixedTime()
60 Time time; in FixedTime()
61 ignore_result(Time::FromLocalExploded(now_exp, &time)); in FixedTime()
67 Time RoundedToSecond(Time time) { in RoundedToSecond()
68 Time::Exploded exp; in RoundedToSecond()
71 Time rounded_time; in RoundedToSecond()
72 ignore_result(Time::FromLocalExploded(exp, &rounded_time)); in RoundedToSecond()
114 Time SetupUpdateCompletedTime(bool valid) { in SetupUpdateCompletedTime()
[all …]
Dreal_shill_provider_unittest.cc36 using base::Time;
85 Time InitTime() { in InitTime()
86 Time::Exploded now_exp; in InitTime()
95 Time time; in InitTime()
96 ignore_result(Time::FromLocalExploded(now_exp, &time)); in InitTime()
100 Time ConnChangedTime() { return InitTime() + TimeDelta::FromSeconds(10); } in ConnChangedTime()
128 Time* conn_change_time_p) { in SendDefaultServiceSignal()
129 const Time conn_change_time = ConnChangedTime(); in SendDefaultServiceSignal()
147 Time* conn_change_time_p) { in SetupConnectionAndAttrs()
154 Time conn_change_time; in SetupConnectionAndAttrs()
[all …]
Dnext_update_check_policy_impl.cc23 using base::Time;
40 Time next_update_check; in UpdateCheckAllowed()
60 Time* next_update_check, in NextUpdateCheckTime()
71 const Time* updater_started_time = in NextUpdateCheckTime()
75 const Time* last_checked_time = in NextUpdateCheckTime()
Dpolicy.h82 base::Time first_seen;
92 base::Time failures_last_updated;
112 std::vector<std::tuple<int, chromeos_update_engine::ErrorCode, base::Time>>
120 base::Time p2p_first_attempted;
126 base::Time backoff_expiry;
191 base::Time backoff_expiry;
/system/update_engine/
Dpayload_state.h96 inline base::Time GetBackoffExpiryTime() override { in GetBackoffExpiryTime()
123 base::Time GetP2PFirstAttemptTimestamp() override;
306 void SetBackoffExpiryTime(const base::Time& new_time);
312 void SetUpdateTimestampStart(const base::Time& value);
317 void SetUpdateTimestampEnd(const base::Time& value);
325 const base::Time& timestamp,
419 void SetP2PFirstAttemptTimestamp(const base::Time& time);
458 base::Time p2p_first_attempt_timestamp_;
519 base::Time backoff_expiry_time_;
525 base::Time update_timestamp_start_;
[all …]
Dupdate_attempter_android_unittest.cc37 using base::Time;
111 Time now = Time::FromInternalValue(34456); in TEST_F()
113 TimeDelta duration = now - Time::FromInternalValue(23456); in TEST_F()
133 Time boot_time = Time::FromInternalValue(22345); in TEST_F()
134 Time up_time = Time::FromInternalValue(21345); in TEST_F()
137 TimeDelta duration = boot_time - Time::FromInternalValue(10000); in TEST_F()
138 TimeDelta duration_uptime = up_time - Time::FromInternalValue(12345); in TEST_F()
Dmetrics_utils_unittest.cc88 fake_clock.SetWallclockTime(base::Time::FromInternalValue(1000000)); in TEST()
110 fake_clock.SetWallclockTime(base::Time::FromInternalValue(2000000)); in TEST()
119 fake_clock.SetWallclockTime(base::Time::FromInternalValue(4000000)); in TEST()
130 fake_clock.SetWallclockTime(base::Time::FromInternalValue(3000000)); in TEST()
133 fake_clock.SetWallclockTime(base::Time::FromInternalValue(4000000)); in TEST()
148 fake_clock.SetMonotonicTime(base::Time::FromInternalValue(1000000)); in TEST()
170 fake_clock.SetMonotonicTime(base::Time::FromInternalValue(2000000)); in TEST()
179 fake_clock.SetMonotonicTime(base::Time::FromInternalValue(4000000)); in TEST()
Dmetrics_utils.cc28 using base::Time;
299 Time now = system_state->clock()->GetWallclockTime(); in WallclockDurationHelper()
302 Time stored_time = Time::FromInternalValue(stored_value); in WallclockDurationHelper()
325 Time now = system_state->clock()->GetMonotonicTime(); in MonotonicDurationHelper()
327 Time stored_time = Time::FromInternalValue(*storage); in MonotonicDurationHelper()
371 Time update_finish_time = clock->GetMonotonicTime(); in SetSystemUpdatedMarker()
377 void SetUpdateTimestampStart(const Time& update_start_time, in SetUpdateTimestampStart()
386 void SetUpdateBootTimestampStart(const base::Time& update_start_boot_time, in SetUpdateBootTimestampStart()
404 Time system_updated_at = Time::FromInternalValue(stored_value); in LoadAndReportTimeToReboot()

1234