Home
last modified time | relevance | path

Searched refs:TimeDelta (Results 1 – 25 of 112) sorted by relevance

12345

/system/update_engine/update_manager/
Dweekly_time_unittest.cc23 using base::TimeDelta;
44 TimeDelta /* start_time */,
46 TimeDelta /* end_time */,
47 TimeDelta /* expected result */>> {
50 TimeDelta start_time() { return std::get<1>(GetParam()); } in start_time()
52 TimeDelta end_time() { return std::get<3>(GetParam()); } in end_time()
53 TimeDelta result() { return std::get<4>(GetParam()); } in result()
67 TimeDelta::FromMinutes(30),
69 TimeDelta::FromMinutes(30),
70 TimeDelta::FromDays(2))));
[all …]
Dweekly_time.cc23 using base::TimeDelta;
32 TimeDelta WeeklyTime::GetDurationTo(const WeeklyTime& other) const { in GetDurationTo()
35 (TimeDelta::FromDays(kDaysInWeek) - TimeFromStartOfWeek()); in GetDurationTo()
40 TimeDelta WeeklyTime::TimeFromStartOfWeek() const { in TimeFromStartOfWeek()
41 return TimeDelta::FromDays(day_of_week_) + time_; in TimeFromStartOfWeek()
44 void WeeklyTime::AddTime(const TimeDelta& offset) { in AddTime()
47 time_ -= TimeDelta::FromDays(days_over); in AddTime()
56 TimeDelta::FromHours(exploded.hour) + in FromTime()
57 TimeDelta::FromMinutes(exploded.minute)); in FromTime()
Dchromeos_policy_unittest.cc27 using base::TimeDelta;
81 new TimeDelta()); in SetUpDefaultDevicePolicy()
109 curr_time += TimeDelta::FromSeconds(1); in SetUpdateCheckAllowed()
111 curr_time -= TimeDelta::FromSeconds(1); in SetUpdateCheckAllowed()
183 fake_clock_.GetWallclockTime() + TimeDelta::FromMinutes(1234); in TEST_F()
198 fake_clock_.SetWallclockTime(next_update_check - TimeDelta::FromSeconds(1)); in TEST_F()
206 fake_clock_.SetWallclockTime(next_update_check + TimeDelta::FromSeconds(1)); in TEST_F()
219 fake_clock_.GetWallclockTime() + TimeDelta::FromMinutes(1234); in TEST_F()
231 fake_clock_.SetWallclockTime(next_update_check + TimeDelta::FromSeconds(1)); in TEST_F()
243 fake_clock_.SetWallclockTime(next_update_check + TimeDelta::FromSeconds(1)); in TEST_F()
[all …]
Dnext_update_check_policy_impl_unittest.cc24 using base::TimeDelta;
55 new Time(fake_clock_.GetWallclockTime() - TimeDelta::FromMinutes(10))); in TEST_F()
63 TimeDelta::FromSeconds( in TEST_F()
79 TimeDelta::FromSeconds( in TEST_F()
84 TimeDelta::FromSeconds( in TEST_F()
107 TimeDelta::FromSeconds(expected_interval - expected_interval / 2), in TEST_F()
111 TimeDelta::FromSeconds(expected_interval + expected_interval / 2), in TEST_F()
133 TimeDelta::FromSeconds(kInterval - kInterval / 2), in TEST_F()
136 TimeDelta::FromSeconds(kInterval + kInterval / 2), in TEST_F()
152 TimeDelta::FromSeconds( in TEST_F()
[all …]
Devaluation_context_unittest.cc37 using base::TimeDelta;
125 TimeDelta default_timeout_ = TimeDelta::FromSeconds(5);
139 TimeDelta::FromSeconds(1)};
267 TimeDelta::FromSeconds(10), in TEST_F()
284 TimeDelta::FromSeconds(10), in TEST_F()
340 TimeDelta::FromSeconds(10), in TEST_F()
366 TimeDelta::FromSeconds(1)}; in TEST_F()
377 TimeDelta::FromSeconds(10), in TEST_F()
392 TimeDelta::FromSeconds(1)); in TEST_F()
394 TimeDelta timeout = default_timeout_ - TimeDelta::FromSeconds(1); in TEST_F()
[all …]
Devaluation_context.h70 base::TimeDelta evaluation_timeout,
71 base::TimeDelta expiration_timeout,
74 base::TimeDelta evaluation_timeout) in EvaluationContext()
78 base::TimeDelta::Max(), in EvaluationContext()
148 base::TimeDelta RemainingTime(base::Time monotonic_deadline) const;
152 base::Time MonotonicDeadline(base::TimeDelta timeout);
197 const base::TimeDelta evaluation_timeout_;
204 const base::TimeDelta expiration_timeout_;
Dreal_time_provider.cc26 using base::TimeDelta;
38 : Variable<Time>(name, TimeDelta::FromHours(1)), clock_(clock) {} in CurrDateVariable()
41 virtual const Time* GetValue(TimeDelta /* timeout */, string* /* errmsg */) { in GetValue() argument
63 : Variable<int>(name, TimeDelta::FromMinutes(5)), clock_(clock) {} in CurrHourVariable()
66 virtual const int* GetValue(TimeDelta /* timeout */, string* /* errmsg */) { in GetValue() argument
81 : Variable<int>(name, TimeDelta::FromSeconds(15)), clock_(clock) {} in CurrMinuteVariable()
84 virtual const int* GetValue(TimeDelta /* timeout */, string* /* errmsg */) { in GetValue() argument
Dweekly_time.h30 WeeklyTime(const int& day_of_week, const base::TimeDelta& time) in WeeklyTime()
45 base::TimeDelta GetDurationTo(const WeeklyTime& other) const;
48 base::TimeDelta TimeFromStartOfWeek() const;
52 void AddTime(const base::TimeDelta& offset);
56 base::TimeDelta time() const { return time_; } in time()
60 base::TimeDelta time_;
Devaluation_context.cc35 using base::TimeDelta;
57 TimeDelta GetTimeout(Time curr, Time expires) { in GetTimeout()
59 return TimeDelta::Max(); in GetTimeout()
69 TimeDelta evaluation_timeout, in EvaluationContext()
70 TimeDelta expiration_timeout, in EvaluationContext()
98 TimeDelta EvaluationContext::RemainingTime(Time monotonic_deadline) const { in RemainingTime()
100 return TimeDelta::Max(); in RemainingTime()
101 TimeDelta remaining = monotonic_deadline - clock_->GetMonotonicTime(); in RemainingTime()
102 return std::max(remaining, TimeDelta()); in RemainingTime()
105 Time EvaluationContext::MonotonicDeadline(TimeDelta timeout) { in MonotonicDeadline()
[all …]
Dvariable.h84 base::TimeDelta GetPollInterval() const { return poll_interval_; } in GetPollInterval()
104 name, mode, base::TimeDelta::FromMinutes(kDefaultPollMinutes)) {} in BaseVariable()
108 BaseVariable(const std::string& name, base::TimeDelta poll_interval) in BaseVariable()
112 void SetPollInterval(base::TimeDelta poll_interval) { in SetPollInterval()
139 base::TimeDelta poll_interval) in BaseVariable()
143 : base::TimeDelta()) {} in BaseVariable()
172 base::TimeDelta poll_interval_;
200 Variable(const std::string& name, const base::TimeDelta poll_interval) in Variable()
212 virtual const T* GetValue(base::TimeDelta timeout, std::string* errmsg) = 0;
Dstaging_utils_unittest.cc29 using base::TimeDelta;
39 constexpr TimeDelta kDay = TimeDelta::FromDays(1);
47 test_wait_time_ = TimeDelta(); in SetUp()
71 EXPECT_EQ(TimeDelta(), test_wait_time_); in ExpectNoChanges()
76 TimeDelta test_wait_time_;
159 EXPECT_NE(TimeDelta(), test_wait_time_); in TEST_F()
Dreal_system_provider.cc51 const base::TimeDelta poll_interval, in RetryPollVariable()
62 const T* GetValue(base::TimeDelta /* timeout */, in GetValue() argument
73 base::TimeDelta::FromSeconds(kRetryPollVariableRetryIntervalSeconds)); in GetValue()
87 base::TimeDelta base_interval_;
115 base::TimeDelta::FromHours(5), // Same as Chrome's CWS poll. in Init()
Dstaging_utils.cc32 using base::TimeDelta;
103 TimeDelta* staging_wait_time, in CalculateStagingCase()
112 TimeDelta new_staging_wait_time = TimeDelta::FromDays( in CalculateStagingCase()
134 *staging_wait_time = TimeDelta::FromDays(wait_period_in_days); in CalculateStagingCase()
Dupdate_time_restrictions_policy_impl_unittest.cc27 using base::TimeDelta;
34 constexpr TimeDelta kHour = TimeDelta::FromHours(1);
35 constexpr TimeDelta kMinute = TimeDelta::FromMinutes(1);
Dreal_updater_provider.cc37 using base::TimeDelta;
103 const Time* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
122 const double* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
155 const Stage* GetValue(TimeDelta /* timeout */, string* errmsg) override;
174 const Stage* StageVariable::GetValue(TimeDelta /* timeout */, string* errmsg) { in GetValue() argument
195 const string* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
213 const uint64_t* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
237 const Time* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
253 TimeDelta duration_since_update = curr_boottime - update_boottime; in GetValue()
267 const string* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
[all …]
Dboxed_value_unittest.cc36 using base::TimeDelta;
159 BoxedValue(new TimeDelta(TimeDelta::FromSeconds(12345))).ToString()); in TEST()
275 WeeklyTime(2, TimeDelta::FromMinutes(100)), in TEST()
276 WeeklyTime(4, TimeDelta::FromMinutes(200)))) in TEST()
280 WeeklyTime(1, TimeDelta::FromMinutes(10)), in TEST()
281 WeeklyTime(1, TimeDelta::FromMinutes(20)))) in TEST()
287 intervals.emplace_back(WeeklyTime(5, TimeDelta::FromMinutes(10)), in TEST()
288 WeeklyTime(1, TimeDelta::FromMinutes(30))); in TEST()
293 intervals.emplace_back(WeeklyTime(1, TimeDelta::FromMinutes(5)), in TEST()
294 WeeklyTime(6, TimeDelta::FromMinutes(1000))); in TEST()
Dupdate_manager_unittest.cc46 using base::TimeDelta;
85 TimeDelta::FromSeconds(5), in SetUp()
86 TimeDelta::FromSeconds(1), in SetUp()
214 update_state.scatter_wait_period = TimeDelta::FromSeconds(15); in TEST_F()
216 update_state.scatter_wait_period_max = TimeDelta::FromSeconds(60); in TEST_F()
287 test_clock_.Advance(TimeDelta::FromSeconds(2)); in TEST_F()
300 fake_clock_.GetWallclockTime() + TimeDelta::FromSeconds(3), in TEST_F()
316 test_clock_.Advance(TimeDelta::FromSeconds(2)); in TEST_F()
318 TimeDelta::FromSeconds(2)); in TEST_F()
324 test_clock_.Advance(TimeDelta::FromSeconds(2)); in TEST_F()
[all …]
/system/update_engine/
Dmock_payload_state.h51 MOCK_METHOD1(SetScatteringWaitPeriod, void(base::TimeDelta));
54 MOCK_METHOD1(SetStagingWaitPeriod, void(base::TimeDelta));
65 MOCK_METHOD0(GetUpdateDuration, base::TimeDelta());
66 MOCK_METHOD0(GetUpdateDurationUptime, base::TimeDelta());
77 MOCK_METHOD0(GetScatteringWaitPeriod, base::TimeDelta());
79 MOCK_METHOD0(GetStagingWaitPeriod, base::TimeDelta());
Dpayload_state.h99 base::TimeDelta GetUpdateDuration() override;
101 base::TimeDelta GetUpdateDurationUptime() override;
132 base::TimeDelta GetScatteringWaitPeriod() override { in GetScatteringWaitPeriod()
136 void SetScatteringWaitPeriod(base::TimeDelta wait_period) override;
138 void SetStagingWaitPeriod(base::TimeDelta wait_period) override;
313 void SetUpdateDurationUptimeExtended(const base::TimeDelta& value,
320 void SetUpdateDurationUptime(const base::TimeDelta& value);
506 base::TimeDelta update_duration_current_;
516 base::TimeDelta update_duration_uptime_;
541 static const base::TimeDelta kDurationSlack;
[all …]
Dmock_metrics_reporter.h37 MOCK_METHOD1(ReportDailyMetrics, void(base::TimeDelta os_age));
49 base::TimeDelta duration,
50 base::TimeDelta duration_uptime,
71 base::TimeDelta total_duration,
72 base::TimeDelta total_duration_uptime,
Dmetrics_reporter_interface.h65 virtual void ReportDailyMetrics(base::TimeDelta os_age) = 0;
128 base::TimeDelta duration,
129 base::TimeDelta duration_uptime,
182 base::TimeDelta total_duration,
183 base::TimeDelta total_duration_uptime,
Dmetrics_reporter_stub.h41 void ReportDailyMetrics(base::TimeDelta os_age) override {} in ReportDailyMetrics()
52 base::TimeDelta duration, in ReportUpdateAttemptMetrics()
53 base::TimeDelta duration_uptime, in ReportUpdateAttemptMetrics()
74 base::TimeDelta total_duration, in ReportSuccessfulUpdateMetrics()
75 base::TimeDelta total_duration_uptime, in ReportSuccessfulUpdateMetrics()
Dmetrics_reporter_android.h41 void ReportDailyMetrics(base::TimeDelta os_age) override {} in ReportDailyMetrics()
52 base::TimeDelta duration,
53 base::TimeDelta duration_uptime,
74 base::TimeDelta total_duration,
75 base::TimeDelta total_duration_uptime,
Dpayload_state_interface.h134 virtual base::TimeDelta GetUpdateDuration() = 0;
139 virtual base::TimeDelta GetUpdateDurationUptime() = 0;
197 virtual base::TimeDelta GetScatteringWaitPeriod() = 0;
200 virtual void SetScatteringWaitPeriod(base::TimeDelta wait_period) = 0;
210 virtual void SetStagingWaitPeriod(base::TimeDelta wait_period) = 0;
/system/bt/common/
Donce_timer_unittest.cc100 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
127 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
138 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
152 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
168 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
183 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
188 base::TimeDelta::FromMilliseconds(delay_ms + 1000)); in TEST_F()
199 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
204 base::TimeDelta::FromMilliseconds(delay_ms + 1000)); in TEST_F()
217 base::TimeDelta::FromMilliseconds(delay_ms)); in TEST_F()
[all …]

12345