Home
last modified time | relevance | path

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

1234

/system/update_engine/update_manager/
Dchromeos_policy_unittest.cc34 using base::TimeDelta;
51 eval_ctx_ = new EvaluationContext(&fake_clock_, TimeDelta::FromSeconds(5)); in SetUp()
115 new TimeDelta()); in SetUpDefaultDevicePolicy()
136 curr_time += TimeDelta::FromSeconds(1); in SetUpdateCheckAllowed()
138 curr_time -= TimeDelta::FromSeconds(1); in SetUpdateCheckAllowed()
143 UpdateState GetDefaultUpdateState(TimeDelta first_seen_period) { in GetDefaultUpdateState()
175 update_state.scatter_wait_period = TimeDelta(); in GetDefaultUpdateState()
177 update_state.scatter_wait_period_max = TimeDelta::FromDays(7); in GetDefaultUpdateState()
213 new Time(fake_clock_.GetWallclockTime() - TimeDelta::FromMinutes(10))); in TEST_F()
220 fake_clock_.GetWallclockTime() + TimeDelta::FromSeconds( in TEST_F()
[all …]
Devaluation_context_unittest.cc36 using base::TimeDelta;
122 TimeDelta default_timeout_ = TimeDelta::FromSeconds(5);
136 TimeDelta::FromSeconds(1)};
258 TimeDelta::FromSeconds(10), in TEST_F()
275 TimeDelta::FromSeconds(10), in TEST_F()
319 TimeDelta::FromSeconds(10), in TEST_F()
339 TimeDelta::FromSeconds(1)}; in TEST_F()
350 TimeDelta::FromSeconds(10), in TEST_F()
365 fake_clock_.GetMonotonicTime() + TimeDelta::FromSeconds(1)); in TEST_F()
367 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()
76 clock, evaluation_timeout, base::TimeDelta::Max(), in EvaluationContext()
146 base::TimeDelta RemainingTime(base::Time monotonic_deadline) const;
150 base::Time MonotonicDeadline(base::TimeDelta timeout);
196 const base::TimeDelta evaluation_timeout_;
203 const base::TimeDelta expiration_timeout_;
Devaluation_context.cc36 using base::TimeDelta;
59 TimeDelta GetTimeout(Time curr, Time expires) { in GetTimeout()
61 return TimeDelta::Max(); in GetTimeout()
71 TimeDelta evaluation_timeout, in EvaluationContext()
72 TimeDelta expiration_timeout, in EvaluationContext()
100 TimeDelta EvaluationContext::RemainingTime(Time monotonic_deadline) const { in RemainingTime()
102 return TimeDelta::Max(); in RemainingTime()
103 TimeDelta remaining = monotonic_deadline - clock_->GetMonotonicTime(); in RemainingTime()
104 return std::max(remaining, TimeDelta()); in RemainingTime()
107 Time EvaluationContext::MonotonicDeadline(TimeDelta timeout) { in MonotonicDeadline()
[all …]
Dvariable.h88 base::TimeDelta GetPollInterval() const { in GetPollInterval()
110 base::TimeDelta::FromMinutes(kDefaultPollMinutes)) {} in BaseVariable()
114 BaseVariable(const std::string& name, base::TimeDelta poll_interval) in BaseVariable()
118 void SetPollInterval(base::TimeDelta poll_interval) { in SetPollInterval()
144 base::TimeDelta poll_interval) in BaseVariable()
147 poll_interval : base::TimeDelta()) {} in BaseVariable()
176 base::TimeDelta poll_interval_;
204 Variable(const std::string& name, const base::TimeDelta poll_interval) in Variable()
216 virtual const T* GetValue(base::TimeDelta timeout, std::string* errmsg) = 0;
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 */, in GetValue() argument
61 : Variable<int>(name, TimeDelta::FromMinutes(5)), clock_(clock) {} in CurrHourVariable()
64 virtual const int* GetValue(TimeDelta /* timeout */, in GetValue() argument
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_;
118 base::TimeDelta::FromHours(5), // Same as Chrome's CWS poll. in Init()
Dreal_updater_provider.cc35 using base::TimeDelta;
93 const Time* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
112 const double* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
145 const Stage* GetValue(TimeDelta /* timeout */, string* errmsg) override;
165 const Stage* StageVariable::GetValue(TimeDelta /* timeout */, in GetValue() argument
187 const string* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
205 const int64_t* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
235 const Time* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
251 TimeDelta duration_since_update = curr_boottime - update_boottime; in GetValue()
265 const string* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() argument
[all …]
Dupdate_manager_unittest.cc46 using base::TimeDelta;
82 umut_.reset(new UpdateManager(&fake_clock_, TimeDelta::FromSeconds(5), in SetUp()
83 TimeDelta::FromSeconds(1), fake_state_)); in SetUp()
207 update_state.scatter_wait_period = TimeDelta::FromSeconds(15); in TEST_F()
209 update_state.scatter_wait_period_max = TimeDelta::FromSeconds(60); in TEST_F()
280 test_clock_.Advance(TimeDelta::FromSeconds(2)); in TEST_F()
292 0, fake_clock_.GetWallclockTime() + TimeDelta::FromSeconds(3), in TEST_F()
308 test_clock_.Advance(TimeDelta::FromSeconds(2)); in TEST_F()
310 TimeDelta::FromSeconds(2)); in TEST_F()
316 test_clock_.Advance(TimeDelta::FromSeconds(2)); in TEST_F()
[all …]
Dgeneric_variables.h67 PollCopyVariable(const std::string& name, const base::TimeDelta poll_interval, in PollCopyVariable()
72 PollCopyVariable(const std::string& name, const base::TimeDelta poll_interval, in PollCopyVariable()
75 PollCopyVariable(const std::string& name, const base::TimeDelta poll_interval, in PollCopyVariable()
84 inline const T* GetValue(base::TimeDelta /* timeout */, in GetValue() argument
123 const T* GetValue(base::TimeDelta /* timeout */, in GetValue() argument
141 const base::TimeDelta poll_interval, in CallCopyVariable()
147 const T* GetValue(base::TimeDelta /* timeout */, in GetValue() argument
198 const T* GetValue(base::TimeDelta /* timeout */, in GetValue() argument
Dvariable_unittest.cc26 using base::TimeDelta;
40 DefaultVariable(const string& name, const TimeDelta& poll_interval) in DefaultVariable()
45 const T* GetValue(TimeDelta /* timeout */, in GetValue() argument
77 EXPECT_EQ(const_var.GetPollInterval(), TimeDelta()); in TEST_F()
79 EXPECT_EQ(poll_var.GetPollInterval(), TimeDelta::FromMinutes(5)); in TEST_F()
83 DefaultVariable<int> var("var", TimeDelta::FromMinutes(3)); in TEST_F()
85 EXPECT_EQ(var.GetPollInterval(), TimeDelta::FromMinutes(3)); in TEST_F()
Dupdate_manager.h51 base::TimeDelta evaluation_timeout,
52 base::TimeDelta expiration_timeout, State* state);
155 const base::TimeDelta evaluation_timeout_;
158 const base::TimeDelta expiration_timeout_;
Dfake_update_manager.h30 : UpdateManager(clock, base::TimeDelta::FromSeconds(5), in FakeUpdateManager()
31 base::TimeDelta::FromHours(1), new FakeState()) { in FakeUpdateManager()
Dupdate_manager.cc25 base::TimeDelta evaluation_timeout, in UpdateManager()
26 base::TimeDelta expiration_timeout, State* state) in UpdateManager()
Dreal_device_policy_provider.cc30 using base::TimeDelta;
100 TimeDelta::FromMinutes(kDevicePolicyRefreshRateInMinutes)); in RefreshDevicePolicyAndReschedule()
150 TimeDelta* scatter_factor) const { in ConvertScatterFactor()
161 *scatter_factor = TimeDelta::FromSeconds(scatter_factor_in_seconds); in ConvertScatterFactor()
/system/update_engine/
Dpayload_state.h103 base::TimeDelta GetUpdateDuration() override;
105 base::TimeDelta GetUpdateDurationUptime() override;
138 base::TimeDelta GetScatteringWaitPeriod() override { in GetScatteringWaitPeriod()
142 void SetScatteringWaitPeriod(base::TimeDelta wait_period) override;
328 void SetUpdateDurationUptimeExtended(const base::TimeDelta& value,
335 void SetUpdateDurationUptime(const base::TimeDelta& value);
416 void BootedIntoUpdate(base::TimeDelta time_to_reboot);
524 base::TimeDelta update_duration_current_;
534 base::TimeDelta update_duration_uptime_;
559 static const base::TimeDelta kDurationSlack;
[all …]
Dmock_payload_state.h53 MOCK_METHOD1(SetScatteringWaitPeriod, void(base::TimeDelta));
66 MOCK_METHOD0(GetUpdateDuration, base::TimeDelta());
67 MOCK_METHOD0(GetUpdateDurationUptime, base::TimeDelta());
76 MOCK_METHOD0(GetScatteringWaitPeriod, base::TimeDelta());
Dpayload_state_interface.h134 virtual base::TimeDelta GetUpdateDuration() = 0;
139 virtual base::TimeDelta GetUpdateDurationUptime() = 0;
187 virtual base::TimeDelta GetScatteringWaitPeriod() = 0;
190 virtual void SetScatteringWaitPeriod(base::TimeDelta wait_period) = 0;
Dp2p_manager_unittest.cc52 using base::TimeDelta;
88 TimeDelta::FromDays(5))); in SetUp()
141 TimeDelta() /* max_file_age */)); in TEST_F()
150 base::Time file_time = start_time + TimeDelta::FromMinutes(n); in TEST_F()
193 TimeDelta age_limit = TimeDelta::FromDays(5); in TEST_F()
221 base::Time file_date = cutoff_time + (n - 2) * TimeDelta::FromDays(1) in TEST_F()
222 + TimeDelta::FromHours(12); in TEST_F()
477 manager_->LookupUrlForFile("fooX", 42, TimeDelta(), in TEST_F()
484 manager_->LookupUrlForFile("foobar", 42, TimeDelta(), in TEST_F()
490 manager_->LookupUrlForFile("foobar", 42, TimeDelta(), in TEST_F()
[all …]
Dpayload_state.cc41 using base::TimeDelta;
47 const TimeDelta PayloadState::kDurationSlack = TimeDelta::FromSeconds(600);
521 TimeDelta next_backoff_interval = TimeDelta::FromDays(num_days) + in UpdateBackoffExpiryTime()
522 TimeDelta::FromMinutes(fuzz_minutes); in UpdateBackoffExpiryTime()
591 TimeDelta duration = clock->GetBootTime() - attempt_start_time_boot_; in CollectAndReportAttemptMetrics()
592 TimeDelta duration_uptime = clock->GetMonotonicTime() - in CollectAndReportAttemptMetrics()
725 TimeDelta duration = GetUpdateDuration(); in CollectAndReportSuccessfulUpdateMetrics()
778 SetUpdateDurationUptime(TimeDelta::FromSeconds(0)); in ResetPersistedState()
783 SetScatteringWaitPeriod(TimeDelta()); in ResetPersistedState()
925 TimeDelta::FromSeconds(GetPersistedValue(kPrefsWallClockWaitPeriod))); in LoadScatteringWaitPeriod()
[all …]
Dmetrics.h198 base::TimeDelta os_age);
260 base::TimeDelta duration,
261 base::TimeDelta duration_uptime,
304 base::TimeDelta total_duration,
Dmetrics_utils.h53 base::TimeDelta* out_duration);
66 base::TimeDelta* out_duration);
/system/bt/service/common/bluetooth/
Dscan_settings.h117 ResultType result_type, base::TimeDelta report_delay_ms,
134 const base::TimeDelta& report_delay() const { return report_delay_ms_; } in report_delay()
135 void set_report_delay(const base::TimeDelta& delay) { in set_report_delay()
156 base::TimeDelta report_delay_ms_;
Dadvertise_settings.h64 AdvertiseSettings(Mode mode, base::TimeDelta timeout,
78 const base::TimeDelta& timeout() const { return timeout_; } in timeout()
91 base::TimeDelta timeout_;
/system/update_engine/common/
Dutils_unittest.cc256 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromMilliseconds(100)), in TEST()
258 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(0)), in TEST()
260 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(1)), in TEST()
262 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(59)), in TEST()
264 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(60)), in TEST()
266 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(61)), in TEST()
268 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(90)), in TEST()
270 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(1205)), in TEST()
272 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(3600)), in TEST()
274 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(3601)), in TEST()
[all …]

1234