/system/connectivity/shill/net/ |
D | shill_time.cc | 36 base::LazyInstance<Time>::Leaky g_time = LAZY_INSTANCE_INITIALIZER; 40 Time::Time() { } in Time() function in shill::Time 42 Time::~Time() { } in ~Time() 44 Time* Time::GetInstance() { in GetInstance() 48 bool Time::GetSecondsMonotonic(time_t* seconds) { in GetSecondsMonotonic() 58 bool Time::GetSecondsBoottime(time_t* seconds) { in GetSecondsBoottime() 68 int Time::GetTimeMonotonic(struct timeval* tv) { in GetTimeMonotonic() 79 int Time::GetTimeBoottime(struct timeval* tv) { in GetTimeBoottime() 90 int Time::GetTimeOfDay(struct timeval* tv, struct timezone* tz) { in GetTimeOfDay() 94 Timestamp Time::GetNow() { in GetNow() [all …]
|
D | shill_time.h | 52 class SHILL_EXPORT Time { 54 virtual ~Time(); 56 static Time* GetInstance(); 81 Time(); 84 friend struct base::DefaultLazyInstanceTraits<Time>; 86 DISALLOW_COPY_AND_ASSIGN(Time);
|
D | event_history.h | 43 EventHistory() : max_events_specified_(false), time_(Time::GetInstance()) {} in EventHistory() 47 time_(Time::GetInstance()) {} in EventHistory() 93 Time* time_;
|
/system/update_engine/common/ |
D | clock.cc | 23 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()
|
D | fake_clock.h | 29 base::Time GetWallclockTime() override { in GetWallclockTime() 33 base::Time GetMonotonicTime() override { in GetMonotonicTime() 37 base::Time GetBootTime() override { in GetBootTime() 41 void SetWallclockTime(const base::Time &time) { in SetWallclockTime() 45 void SetMonotonicTime(const base::Time &time) { in SetMonotonicTime() 49 void SetBootTime(const base::Time &time) { in SetBootTime() 54 base::Time wallclock_time_; 55 base::Time monotonic_time_; 56 base::Time boot_time_;
|
D | clock_interface.h | 35 virtual base::Time GetWallclockTime() = 0; 42 virtual base::Time GetMonotonicTime() = 0; 49 virtual base::Time GetBootTime() = 0;
|
D | clock.h | 29 base::Time GetWallclockTime() override; 31 base::Time GetMonotonicTime() override; 33 base::Time GetBootTime() override;
|
D | utils_unittest.cc | 387 EXPECT_EQ(base::Time::UnixEpoch(), utils::TimeFromStructTimespec(&ts)); in TEST() 392 base::Time::Exploded exploded = (base::Time::Exploded) { in TEST() 395 EXPECT_EQ(base::Time::FromUTCExploded(exploded), in TEST() 433 base::Time::FromTimeT(omaha_epoch), &value)); in TEST() 438 base::Time::FromTimeT(omaha_epoch - 1), &value)); in TEST() 440 base::Time::FromTimeT(omaha_epoch - 100*24*3600), &value)); in TEST() 445 base::Time::FromTimeT(omaha_epoch + 7*24*3600 - 1), &value)); in TEST() 448 base::Time::FromTimeT(omaha_epoch + 7*24*3600), &value)); in TEST() 453 base::Time::FromTimeT(omaha_epoch + 10*24*3600), &value)); in TEST() 456 base::Time::FromTimeT(omaha_epoch + 20*24*3600), &value)); in TEST() [all …]
|
/system/update_engine/update_manager/ |
D | real_time_provider_unittest.cc | 28 using base::Time; 44 Time CurrTime() { in CurrTime() 45 Time::Exploded now_exp; in CurrTime() 54 return Time::FromLocalExploded(now_exp); in CurrTime() 62 const Time now = CurrTime(); in TEST_F() 63 Time::Exploded exploded; in TEST_F() 69 const Time expected = Time::FromLocalExploded(exploded); in TEST_F() 76 const Time now = CurrTime(); in TEST_F() 77 Time::Exploded expected; in TEST_F()
|
D | real_time_provider.cc | 25 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 */, in GetValue() 43 Time::Exploded now_exp; in GetValue() 46 return new Time(Time::FromLocalExploded(now_exp)); in GetValue() 66 Time::Exploded exploded; in GetValue()
|
D | evaluation_context.h | 92 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); 183 base::Time evaluation_start_wallclock_; 184 base::Time evaluation_start_monotonic_; 192 base::Time reevaluation_time_wallclock_; 193 base::Time reevaluation_time_monotonic_; 200 base::Time evaluation_monotonic_deadline_; 206 base::Time expiration_monotonic_deadline_;
|
D | evaluation_context.cc | 33 using base::Time; 45 bool IsTimeGreaterThanHelper(Time ref_time, Time curr_time, in IsTimeGreaterThanHelper() 46 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() [all …]
|
D | fake_updater_provider.h | 32 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() 89 FakeVariable<base::Time> 92 FakeVariable<base::Time> var_last_checked_time_{ // NOLINT(whitespace/braces) 94 FakeVariable<base::Time>
|
D | real_updater_provider.h | 43 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() 104 ConstCopyVariable<base::Time> var_updater_started_time_; 105 std::unique_ptr<Variable<base::Time>> var_last_checked_time_; 106 std::unique_ptr<Variable<base::Time>> var_update_completed_time_;
|
D | default_policy.h | 42 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();
|
D | update_manager_unittest.cc | 45 using base::Time; 60 Time FixedTime() { in FixedTime() 61 Time::Exploded now_exp; in FixedTime() 70 return Time::FromLocalExploded(now_exp); in FixedTime() 139 DelayPolicy(int sleep_secs, Time time_threshold, int* num_called_p) in DelayPolicy() 154 if (time_threshold_ < Time::Max() && in UpdateCheckAllowed() 166 Time time_threshold_; 195 update_state.failures_last_updated = Time(); in TEST_F() 201 update_state.p2p_first_attempted = Time(); in TEST_F() 204 update_state.download_errors = vector<tuple<int, ErrorCode, Time>>(); in TEST_F() [all …]
|
D | policy.h | 69 base::Time first_seen; 79 base::Time failures_last_updated; 99 std::vector<std::tuple<int, chromeos_update_engine::ErrorCode, base::Time>> 107 base::Time p2p_first_attempted; 113 base::Time backoff_expiry; 178 base::Time backoff_expiry;
|
D | real_updater_provider.cc | 34 using base::Time; 87 class LastCheckedTimeVariable : public UpdaterVariableBase<Time> { 90 : UpdaterVariableBase<Time>(name, kVariableModePoll, system_state) {} in LastCheckedTimeVariable() 93 const Time* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() 98 return new Time(Time::FromTimeT(raw.last_checked_time())); in GetValue() 229 class UpdateCompletedTimeVariable : public UpdaterVariableBase<Time> { 232 : UpdaterVariableBase<Time>(name, kVariableModePoll, system_state) {} in UpdateCompletedTimeVariable() 235 const Time* GetValue(TimeDelta /* timeout */, string* errmsg) override { in GetValue() 236 Time update_boottime; in GetValue() 245 Time curr_boottime = clock->GetBootTime(); in GetValue() [all …]
|
D | real_shill_provider_unittest.cc | 36 using base::Time; 84 Time InitTime() { in InitTime() 85 Time::Exploded now_exp; in InitTime() 94 return Time::FromLocalExploded(now_exp); in InitTime() 97 Time ConnChangedTime() { in ConnChangedTime() 127 Time* conn_change_time_p) { in SendDefaultServiceSignal() 128 const Time conn_change_time = ConnChangedTime(); in SendDefaultServiceSignal() 146 Time* conn_change_time_p) { in SetupConnectionAndAttrs() 153 Time conn_change_time; in SetupConnectionAndAttrs() 172 Time conn_change_time; in SetupConnectionAndTestType() [all …]
|
D | real_updater_provider_unittest.cc | 33 using base::Time; 48 Time FixedTime() { in FixedTime() 49 Time::Exploded now_exp; in FixedTime() 58 return Time::FromLocalExploded(now_exp); in FixedTime() 63 Time RoundedToSecond(Time time) { in RoundedToSecond() 64 Time::Exploded exp; in RoundedToSecond() 67 return Time::FromLocalExploded(exp); in RoundedToSecond() 88 Time SetupUpdateCompletedTime(bool valid) { in SetupUpdateCompletedTime() 90 const Time kUpdateBootTime = Time() + kDurationSinceUpdate * 2; in SetupUpdateCompletedTime() 91 const Time kCurrBootTime = (valid ? in SetupUpdateCompletedTime() [all …]
|
D | chromeos_policy_unittest.cc | 33 using base::Time; 60 fake_clock_.SetMonotonicTime(Time::FromInternalValue(12345678L)); in SetUpDefaultClock() 61 fake_clock_.SetWallclockTime(Time::FromInternalValue(12345678901234L)); in SetUpDefaultClock() 66 new Time(fake_clock_.GetWallclockTime())); in SetUpDefaultState() 68 new Time(fake_clock_.GetWallclockTime())); in SetUpDefaultState() 126 Time next_update_check; in SetUpdateCheckAllowed() 132 Time curr_time = next_update_check; in SetUpdateCheckAllowed() 142 Time first_seen_time = fake_clock_.GetWallclockTime() - first_seen_period; in GetDefaultUpdateState() 153 update_state.failures_last_updated = Time(); // Needs to be zero. in GetDefaultUpdateState() 161 update_state.download_errors = vector<tuple<int, ErrorCode, Time>>(); in GetDefaultUpdateState() [all …]
|
/system/update_engine/ |
D | payload_state.h | 97 inline base::Time GetBackoffExpiryTime() override { in GetBackoffExpiryTime() 124 base::Time GetP2PFirstAttemptTimestamp() override; 301 void SetBackoffExpiryTime(const base::Time& new_time); 307 void SetUpdateTimestampStart(const base::Time& value); 312 void SetUpdateTimestampEnd(const base::Time& value); 320 const base::Time& timestamp, 418 void SetP2PFirstAttemptTimestamp(const base::Time& time); 446 base::Time p2p_first_attempt_timestamp_; 504 base::Time backoff_expiry_time_; 510 base::Time update_timestamp_start_; [all …]
|
D | metrics_utils_unittest.cc | 91 fake_clock.SetWallclockTime(base::Time::FromInternalValue(1000000)); in TEST() 117 fake_clock.SetWallclockTime(base::Time::FromInternalValue(2000000)); in TEST() 128 fake_clock.SetWallclockTime(base::Time::FromInternalValue(4000000)); in TEST() 141 fake_clock.SetWallclockTime(base::Time::FromInternalValue(3000000)); in TEST() 145 fake_clock.SetWallclockTime(base::Time::FromInternalValue(4000000)); in TEST() 161 fake_clock.SetMonotonicTime(base::Time::FromInternalValue(1000000)); in TEST() 187 fake_clock.SetMonotonicTime(base::Time::FromInternalValue(2000000)); in TEST() 198 fake_clock.SetMonotonicTime(base::Time::FromInternalValue(4000000)); in TEST()
|
D | payload_state.cc | 39 using base::Time; 410 if (backoff_expiry_time_ < Time::Now()) { in ShouldBackoffDownload() 482 SetBackoffExpiryTime(Time()); in UpdateBackoffExpiryTime() 487 SetBackoffExpiryTime(Time()); in UpdateBackoffExpiryTime() 512 SetBackoffExpiryTime(Time::Now() + next_backoff_interval); in UpdateBackoffExpiryTime() 582 double sec = static_cast<double>(usec) / Time::kMicrosecondsPerSecond; in CollectAndReportAttemptMetrics() 760 SetUpdateTimestampEnd(Time()); // Set to null time in ResetPersistedState() 765 SetP2PFirstAttemptTimestamp(Time()); // Set to null time in ResetPersistedState() 936 Time stored_time = Time::FromInternalValue(stored_value); in LoadBackoffExpiryTime() 937 if (stored_time > Time::Now() + TimeDelta::FromDays(kMaxBackoffDays)) { in LoadBackoffExpiryTime() [all …]
|
/system/webservd/webservd/ |
D | log_manager_unittest.cc | 34 void Log(const base::Time& timestamp, const std::string& entry) override { in Log() 49 void LogEntry(const base::Time& timestamp) { in LogEntry() 81 base::Time timestamp = base::Time::Now(); in TEST_F() 100 base::Time timestamp = base::Time::FromTimeT(mktime(&date)); in TEST_F() 126 base::Time timestamp = base::Time::FromTimeT(mktime(&date)); in TEST_F()
|