Home
last modified time | relevance | path

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

1234567

/system/update_engine/update_manager/
Dchromeos_policy_unittest.cc34 using base::TimeDelta;
49 eval_ctx_ = new EvaluationContext(&fake_clock_, TimeDelta::FromSeconds(5)); in SetUp()
113 new TimeDelta()); in SetUpDefaultDevicePolicy()
134 curr_time += TimeDelta::FromSeconds(1); in SetUpdateCheckAllowed()
136 curr_time -= TimeDelta::FromSeconds(1); in SetUpdateCheckAllowed()
141 UpdateState GetDefaultUpdateState(TimeDelta first_seen_period) { in GetDefaultUpdateState()
173 update_state.scatter_wait_period = TimeDelta(); in GetDefaultUpdateState()
175 update_state.scatter_wait_period_max = TimeDelta::FromDays(7); in GetDefaultUpdateState()
211 new Time(fake_clock_.GetWallclockTime() - TimeDelta::FromMinutes(10))); in TEST_F()
218 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.cc34 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.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()
137 base::TimeDelta poll_interval) in BaseVariable()
140 poll_interval : base::TimeDelta()) {} in BaseVariable()
169 const base::TimeDelta poll_interval_;
197 Variable(const std::string& name, const base::TimeDelta poll_interval) in Variable()
209 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_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_;
/system/core/metricsd/collectors/
Dcpu_usage_collector.cc41 using base::TimeDelta;
46 collect_interval_ = TimeDelta::FromSeconds(kCollectionIntervalSecs); in CpuUsageCollector()
73 TimeDelta cpu_use = GetCumulativeCpuUse(); in Collect()
74 TimeDelta diff_per_cpu = (cpu_use - latest_cpu_use_) / num_cpu_; in Collect()
84 TimeDelta CpuUsageCollector::GetCumulativeCpuUse() { in GetCumulativeCpuUse()
89 return TimeDelta(); in GetCumulativeCpuUse()
95 return TimeDelta(); in GetCumulativeCpuUse()
99 return TimeDelta::FromMicroseconds( in GetCumulativeCpuUse()
Dcpu_usage_collector.h41 base::TimeDelta GetCumulativeCpuUse();
53 base::TimeDelta collect_interval_;
54 base::TimeDelta latest_cpu_use_;
/system/update_engine/
Dpayload_state.h101 base::TimeDelta GetUpdateDuration() override;
103 base::TimeDelta GetUpdateDurationUptime() override;
136 base::TimeDelta GetScatteringWaitPeriod() override { in GetScatteringWaitPeriod()
140 void SetScatteringWaitPeriod(base::TimeDelta wait_period) override;
319 void SetUpdateDurationUptimeExtended(const base::TimeDelta& value,
326 void SetUpdateDurationUptime(const base::TimeDelta& value);
405 void BootedIntoUpdate(base::TimeDelta time_to_reboot);
507 base::TimeDelta update_duration_current_;
517 base::TimeDelta update_duration_uptime_;
542 static const base::TimeDelta kDurationSlack;
[all …]
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.cc40 using base::TimeDelta;
46 const TimeDelta PayloadState::kDurationSlack = TimeDelta::FromSeconds(600);
508 TimeDelta next_backoff_interval = TimeDelta::FromDays(num_days) + in UpdateBackoffExpiryTime()
509 TimeDelta::FromMinutes(fuzz_minutes); in UpdateBackoffExpiryTime()
575 TimeDelta duration = clock->GetBootTime() - attempt_start_time_boot_; in CollectAndReportAttemptMetrics()
576 TimeDelta duration_uptime = clock->GetMonotonicTime() - in CollectAndReportAttemptMetrics()
709 TimeDelta duration = GetUpdateDuration(); in CollectAndReportSuccessfulUpdateMetrics()
761 SetUpdateDurationUptime(TimeDelta::FromSeconds(0)); in ResetPersistedState()
766 SetScatteringWaitPeriod(TimeDelta()); in ResetPersistedState()
888 TimeDelta::FromSeconds(GetPersistedValue(kPrefsWallClockWaitPeriod))); in LoadScatteringWaitPeriod()
[all …]
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;
Dmock_payload_state.h53 MOCK_METHOD1(SetScatteringWaitPeriod, void(base::TimeDelta));
65 MOCK_METHOD0(GetUpdateDuration, base::TimeDelta());
66 MOCK_METHOD0(GetUpdateDurationUptime, base::TimeDelta());
75 MOCK_METHOD0(GetScatteringWaitPeriod, base::TimeDelta());
Dmetrics.h198 base::TimeDelta os_age);
260 base::TimeDelta duration,
261 base::TimeDelta duration_uptime,
304 base::TimeDelta total_duration,
/system/core/metricsd/
Dtimer_test.cc53 stime += base::TimeDelta::FromMilliseconds(kStime1MSec); in SetUp()
54 etime += base::TimeDelta::FromMilliseconds(kEtime1MSec); in SetUp()
55 stime2 += base::TimeDelta::FromMilliseconds(kStime2MSec); in SetUp()
56 etime2 += base::TimeDelta::FromMilliseconds(kEtime2MSec); in SetUp()
57 stime3 += base::TimeDelta::FromMilliseconds(kStime3MSec); in SetUp()
58 etime3 += base::TimeDelta::FromMilliseconds(kEtime3MSec); in SetUp()
79 base::TimeDelta elapsed_time; in TEST_F()
123 base::TimeDelta elapsed_time; in TEST_F()
138 base::TimeDelta elapsed_time = timer_.elapsed_time_; in TEST_F()
144 base::TimeDelta elapsed_time; in TEST_F()
[all …]
Dtimer.cc34 elapsed_time_ = base::TimeDelta(); // Sets elapsed_time_ to zero. in Start()
79 elapsed_time_ = base::TimeDelta(); // Sets elapsed_time_ to zero. in Reset()
88 bool Timer::GetElapsedTime(base::TimeDelta* elapsed_time) const { in GetElapsedTime()
109 base::TimeDelta elapsed_time; in ReportMilliseconds()
/system/update_engine/common/
Dutils_unittest.cc343 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromMilliseconds(100)), in TEST()
345 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(0)), in TEST()
347 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(1)), in TEST()
349 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(59)), in TEST()
351 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(60)), in TEST()
353 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(61)), in TEST()
355 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(90)), in TEST()
357 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(1205)), in TEST()
359 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(3600)), in TEST()
361 EXPECT_EQ(utils::FormatTimeDelta(base::TimeDelta::FromSeconds(3601)), in TEST()
[all …]
/system/bt/service/common/bluetooth/
Dscan_settings.h119 base::TimeDelta report_delay_ms,
137 const base::TimeDelta& report_delay() const { return report_delay_ms_; } in report_delay()
138 void set_report_delay(const base::TimeDelta& delay) { in set_report_delay()
159 base::TimeDelta report_delay_ms_;
Dadvertise_settings.h65 base::TimeDelta timeout,
80 const base::TimeDelta& timeout() const { return timeout_; } in timeout()
93 base::TimeDelta timeout_;
/system/core/metricsd/uploader/
Dupload_service.h68 const base::TimeDelta& upload_interval,
69 const base::TimeDelta& disk_persistence_interval,
171 base::TimeDelta upload_interval_;
172 base::TimeDelta disk_persistence_interval_;

1234567