Home
last modified time | relevance | path

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

12345678910

/external/libchrome/base/time/
Dtime.h83 class TimeDelta; variable
92 BASE_EXPORT int64_t SaturatedAdd(TimeDelta delta, int64_t value);
93 BASE_EXPORT int64_t SaturatedSub(TimeDelta delta, int64_t value);
103 class BASE_EXPORT TimeDelta {
105 TimeDelta() : delta_(0) { in TimeDelta() function
109 static TimeDelta FromDays(int days);
110 static TimeDelta FromHours(int hours);
111 static TimeDelta FromMinutes(int minutes);
112 static TimeDelta FromSeconds(int64_t secs);
113 static TimeDelta FromMilliseconds(int64_t ms);
[all …]
Dtime_unittest.cc145 EXPECT_TRUE((a - b) < TimeDelta::FromSeconds(1)); in TEST_F()
154 EXPECT_TRUE((a - b) < TimeDelta::FromSeconds(1)); in TEST_F()
366 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1); in TEST_F()
378 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1000); in TEST_F()
390 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1001); in TEST_F()
402 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1000); in TEST_F()
414 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1001); in TEST_F()
439 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1); in TEST_F()
451 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1000); in TEST_F()
463 t = Time::UnixEpoch() + TimeDelta::FromMilliseconds(1000); in TEST_F()
[all …]
Dtime.cc25 TimeDelta TimeDelta::Max() { in Max()
26 return TimeDelta(std::numeric_limits<int64_t>::max()); in Max()
29 int TimeDelta::InDays() const { in InDays()
37 int TimeDelta::InHours() const { in InHours()
45 int TimeDelta::InMinutes() const { in InMinutes()
53 double TimeDelta::InSecondsF() const { in InSecondsF()
61 int64_t TimeDelta::InSeconds() const { in InSeconds()
69 double TimeDelta::InMillisecondsF() const { in InMillisecondsF()
77 int64_t TimeDelta::InMilliseconds() const { in InMilliseconds()
85 int64_t TimeDelta::InMillisecondsRoundedUp() const { in InMillisecondsRoundedUp()
[all …]
/external/libweave/third_party/chromium/base/time/
Dtime.h83 class TimeDelta; variable
92 BASE_EXPORT int64_t SaturatedAdd(TimeDelta delta, int64_t value);
93 BASE_EXPORT int64_t SaturatedSub(TimeDelta delta, int64_t value);
103 class BASE_EXPORT TimeDelta {
105 TimeDelta() : delta_(0) { in TimeDelta() function
109 static TimeDelta FromDays(int days);
110 static TimeDelta FromHours(int hours);
111 static TimeDelta FromMinutes(int minutes);
112 static TimeDelta FromSeconds(int64_t secs);
113 static TimeDelta FromMilliseconds(int64_t ms);
[all …]
Dtime_unittest.cc145 EXPECT_TRUE((a - b) < TimeDelta::FromSeconds(1)); in TEST_F()
154 EXPECT_TRUE((a - b) < TimeDelta::FromSeconds(1)); in TEST_F()
171 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1); in TEST_F()
183 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1000); in TEST_F()
195 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1001); in TEST_F()
207 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1000); in TEST_F()
219 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1001); in TEST_F()
244 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1); in TEST_F()
256 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1000); in TEST_F()
268 t = Time::UnixEpoch() + TimeDelta::FromMilliseconds(1000); in TEST_F()
[all …]
Dtime.cc22 TimeDelta TimeDelta::Max() { in Max()
23 return TimeDelta(std::numeric_limits<int64_t>::max()); in Max()
26 int TimeDelta::InDays() const { in InDays()
34 int TimeDelta::InHours() const { in InHours()
42 int TimeDelta::InMinutes() const { in InMinutes()
50 double TimeDelta::InSecondsF() const { in InSecondsF()
58 int64_t TimeDelta::InSeconds() const { in InSeconds()
66 double TimeDelta::InMillisecondsF() const { in InMillisecondsF()
74 int64_t TimeDelta::InMilliseconds() const { in InMilliseconds()
82 int64_t TimeDelta::InMillisecondsRoundedUp() const { in InMillisecondsRoundedUp()
[all …]
/external/v8/src/base/platform/
Dtime.h34 class TimeDelta final {
36 TimeDelta() : delta_(0) {} in TimeDelta() function
39 static TimeDelta FromDays(int days);
40 static TimeDelta FromHours(int hours);
41 static TimeDelta FromMinutes(int minutes);
42 static TimeDelta FromSeconds(int64_t seconds);
43 static TimeDelta FromMilliseconds(int64_t milliseconds);
44 static TimeDelta FromMicroseconds(int64_t microseconds) { in FromMicroseconds()
45 return TimeDelta(microseconds); in FromMicroseconds()
47 static TimeDelta FromNanoseconds(int64_t nanoseconds);
[all …]
Dtime.cc31 TimeDelta TimeDelta::FromDays(int days) { in FromDays()
32 return TimeDelta(days * Time::kMicrosecondsPerDay); in FromDays()
36 TimeDelta TimeDelta::FromHours(int hours) { in FromHours()
37 return TimeDelta(hours * Time::kMicrosecondsPerHour); in FromHours()
41 TimeDelta TimeDelta::FromMinutes(int minutes) { in FromMinutes()
42 return TimeDelta(minutes * Time::kMicrosecondsPerMinute); in FromMinutes()
46 TimeDelta TimeDelta::FromSeconds(int64_t seconds) { in FromSeconds()
47 return TimeDelta(seconds * Time::kMicrosecondsPerSecond); in FromSeconds()
51 TimeDelta TimeDelta::FromMilliseconds(int64_t milliseconds) { in FromMilliseconds()
52 return TimeDelta(milliseconds * Time::kMicrosecondsPerMillisecond); in FromMilliseconds()
[all …]
/external/v8/test/unittests/base/platform/
Dtime-unittest.cc24 TEST(TimeDelta, FromAndIn) { in TEST() argument
25 EXPECT_EQ(TimeDelta::FromDays(2), TimeDelta::FromHours(48)); in TEST()
26 EXPECT_EQ(TimeDelta::FromHours(3), TimeDelta::FromMinutes(180)); in TEST()
27 EXPECT_EQ(TimeDelta::FromMinutes(2), TimeDelta::FromSeconds(120)); in TEST()
28 EXPECT_EQ(TimeDelta::FromSeconds(2), TimeDelta::FromMilliseconds(2000)); in TEST()
29 EXPECT_EQ(TimeDelta::FromMilliseconds(2), TimeDelta::FromMicroseconds(2000)); in TEST()
30 EXPECT_EQ(static_cast<int>(13), TimeDelta::FromDays(13).InDays()); in TEST()
31 EXPECT_EQ(static_cast<int>(13), TimeDelta::FromHours(13).InHours()); in TEST()
32 EXPECT_EQ(static_cast<int>(13), TimeDelta::FromMinutes(13).InMinutes()); in TEST()
33 EXPECT_EQ(static_cast<int64_t>(13), TimeDelta::FromSeconds(13).InSeconds()); in TEST()
[all …]
Dsemaphore-unittest.cc78 ASSERT_FALSE(semaphore_->WaitFor(TimeDelta::FromMicroseconds(1))); in Run()
120 EXPECT_FALSE(semaphore.WaitFor(TimeDelta::FromMicroseconds(1))); in TEST()
128 ASSERT_FALSE(semaphore.WaitFor(TimeDelta::FromMicroseconds(0))); in TEST()
129 ASSERT_FALSE(semaphore.WaitFor(TimeDelta::FromMicroseconds(100))); in TEST()
130 ASSERT_FALSE(semaphore.WaitFor(TimeDelta::FromMicroseconds(1000))); in TEST()
134 ASSERT_TRUE(semaphore.WaitFor(TimeDelta::FromMicroseconds(0))); in TEST()
136 ASSERT_TRUE(semaphore.WaitFor(TimeDelta::FromMicroseconds(100))); in TEST()
138 ASSERT_TRUE(semaphore.WaitFor(TimeDelta::FromMicroseconds(1000))); in TEST()
/external/libweave/src/
Dbackoff_entry_unittest.cc9 using base::TimeDelta;
40 EXPECT_EQ(TimeDelta(), entry.GetTimeUntilRelease()); in TEST()
44 EXPECT_EQ(TimeDelta::FromMilliseconds(1000), entry.GetTimeUntilRelease()); in TEST()
52 never_expires.set_now(TimeTicks() + TimeDelta::FromDays(100)); in TEST()
66 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(1)); in TEST()
70 TimeDelta::FromMilliseconds(base_policy.maximum_backoff_ms + 1)); in TEST()
75 TimeDelta::FromMilliseconds(base_policy.entry_lifetime_ms - 1)); in TEST()
79 TimeDelta::FromMilliseconds(base_policy.entry_lifetime_ms)); in TEST()
91 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(2000)); in TEST()
99 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(1000)); in TEST()
[all …]
/external/libbrillo/brillo/
Dbackoff_entry_unittest.cc8 using base::TimeDelta;
42 EXPECT_EQ(TimeDelta(), entry.GetTimeUntilRelease()); in TEST()
46 EXPECT_EQ(TimeDelta::FromMilliseconds(1000), entry.GetTimeUntilRelease()); in TEST()
54 never_expires.set_now(TimeTicks() + TimeDelta::FromDays(100)); in TEST()
69 entry.GetReleaseTime() + TimeDelta::FromMilliseconds(1)); in TEST()
71 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds( in TEST()
76 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds( in TEST()
80 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds( in TEST()
93 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(2000)); in TEST()
101 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(1000)); in TEST()
[all …]
/external/libbrillo/brillo/streams/
Dfake_stream.h45 void AddReadPacketData(base::TimeDelta delay, const void* data, size_t size);
46 void AddReadPacketData(base::TimeDelta delay, brillo::Blob data);
47 void AddReadPacketString(base::TimeDelta delay, const std::string& data);
50 void QueueReadError(base::TimeDelta delay);
51 void QueueReadErrorWithMessage(base::TimeDelta delay,
62 void ExpectWritePacketSize(base::TimeDelta delay, size_t data_size);
63 void ExpectWritePacketData(base::TimeDelta delay,
66 void ExpectWritePacketData(base::TimeDelta delay, brillo::Blob data);
67 void ExpectWritePacketString(base::TimeDelta delay, const std::string& data);
70 void QueueWriteError(base::TimeDelta delay);
[all …]
Dfake_stream.cc18 base::TimeDelta CalculateDelay(const base::Time& now, in CalculateDelay()
20 const base::TimeDelta zero_delay; in CalculateDelay()
25 base::TimeDelta delay = delay_until - now; in CalculateDelay()
37 Stream::AccessMode* mode, base::TimeDelta* delay) { in GetMinDelayAndMode()
38 base::TimeDelta read_delay = base::TimeDelta::Max(); in GetMinDelayAndMode()
39 base::TimeDelta write_delay = base::TimeDelta::Max(); in GetMinDelayAndMode()
61 void FakeStream::AddReadPacketData(base::TimeDelta delay, in AddReadPacketData()
68 void FakeStream::AddReadPacketData(base::TimeDelta delay, brillo::Blob data) { in AddReadPacketData()
75 void FakeStream::AddReadPacketString(base::TimeDelta delay, in AddReadPacketString()
80 void FakeStream::QueueReadError(base::TimeDelta delay) { in QueueReadError()
[all …]
/external/libchrome/base/synchronization/
Dcondition_variable_unittest.cc36 const TimeDelta kZeroMs;
37 const TimeDelta kTenMs;
38 const TimeDelta kThirtyMs;
39 const TimeDelta kFortyFiveMs;
40 const TimeDelta kSixtyMs;
41 const TimeDelta kOneHundredMs;
44 : kZeroMs(TimeDelta::FromMilliseconds(0)), in ConditionVariableTest()
45 kTenMs(TimeDelta::FromMilliseconds(10)), in ConditionVariableTest()
46 kThirtyMs(TimeDelta::FromMilliseconds(30)), in ConditionVariableTest()
47 kFortyFiveMs(TimeDelta::FromMilliseconds(45)), in ConditionVariableTest()
[all …]
Dwaitable_event_unittest.cc28 EXPECT_FALSE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
32 EXPECT_TRUE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
46 EXPECT_FALSE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
50 EXPECT_FALSE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
53 EXPECT_TRUE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
79 WaitableEventSignaler(TimeDelta delay, WaitableEvent* event) in WaitableEventSignaler()
90 const TimeDelta delay_;
99 WaitableEventSignaler signaler(TimeDelta::FromMilliseconds(10), ev); in TEST()
116 WaitableEventSignaler signaler(TimeDelta::FromMilliseconds(10), ev[2]); in TEST()
140 TimeDelta thread_delay = TimeDelta::FromMilliseconds(10); in TEST()
[all …]
/external/libbrillo/brillo/message_loops/
Dfake_message_loop_unittest.cc20 using base::TimeDelta;
49 TimeDelta::FromSeconds(1)); in TEST_F()
51 TimeDelta::FromSeconds(4)); in TEST_F()
53 TimeDelta::FromSeconds(3)); in TEST_F()
55 TimeDelta::FromSeconds(2)); in TEST_F()
65 loop_->PostDelayedTask(Bind(&base::DoNothing), TimeDelta::FromSeconds(1)); in TEST_F()
66 loop_->PostDelayedTask(Bind(&base::DoNothing), TimeDelta::FromSeconds(2)); in TEST_F()
74 EXPECT_EQ(start + TimeDelta::FromSeconds(1), clock_.Now()); in TEST_F()
78 clock_.SetNow(start + TimeDelta::FromSeconds(3)); in TEST_F()
81 EXPECT_EQ(start + TimeDelta::FromSeconds(3), clock_.Now()); in TEST_F()
[all …]
/external/libchrome/base/test/
Dtest_timeouts.h21 static base::TimeDelta tiny_timeout() { in tiny_timeout()
23 return base::TimeDelta::FromMilliseconds(tiny_timeout_ms_); in tiny_timeout()
28 static base::TimeDelta action_timeout() { in action_timeout()
30 return base::TimeDelta::FromMilliseconds(action_timeout_ms_); in action_timeout()
36 static base::TimeDelta action_max_timeout() { in action_max_timeout()
38 return base::TimeDelta::FromMilliseconds(action_max_timeout_ms_); in action_max_timeout()
43 static base::TimeDelta test_launcher_timeout() { in test_launcher_timeout()
45 return base::TimeDelta::FromMilliseconds(test_launcher_timeout_ms_); in test_launcher_timeout()
/external/libchrome/base/timer/
Dtimer_unittest.cc15 using base::TimeDelta;
40 timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(delay_ms_), this, in Start()
69 timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(10), this, in Start()
86 explicit RepeatingTimerTester(bool* did_run, const TimeDelta& delay) in RepeatingTimerTester()
105 TimeDelta delay_;
157 const TimeDelta& delay) { in RunTest_RepeatingTimer()
170 const TimeDelta& delay) { in RunTest_RepeatingTimer_Cancel()
210 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_NoCall()
225 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_OneCall()
256 base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, in RunTest_DelayTimer_Reset()
[all …]
Dmock_timer_unittest.cc19 base::TimeDelta delay = base::TimeDelta::FromSeconds(2); in TEST()
33 base::TimeDelta delay = base::TimeDelta::FromSeconds(2); in TEST()
48 base::TimeDelta delay = base::TimeDelta::FromSeconds(2); in TEST()
73 base::TimeDelta delay = base::TimeDelta::FromSeconds(2); in TEST()
Dtimer.h79 TimeDelta delay,
89 virtual TimeDelta GetCurrentDelay() const;
99 TimeDelta delay,
117 TimeDelta delay,
135 void PostNewScheduledTask(TimeDelta delay);
166 TimeDelta delay_;
221 TimeDelta delay, in Start()
258 TimeDelta delay, in DelayTimer()
/external/libweave/src/privet/
Dauth_manager_unittest.cc34 base::TimeDelta ttl, in DelegateToUser()
82 auto new_time = clock_.Now() + base::TimeDelta::FromDays(11); in TEST_F()
169 base::TimeDelta::FromSeconds(i)); in TEST_F()
177 .WillRepeatedly(Return(kStartTime + base::TimeDelta::FromSeconds(i))); in TEST_F()
181 DelegateToUser(token, base::TimeDelta::FromSeconds(1000), in TEST_F()
187 Return(kStartTime + base::TimeDelta::FromSeconds(i + 1))); in TEST_F()
205 auto new_time = clock_.Now() + base::TimeDelta::FromDays(15); in TEST_F()
251 base::TimeDelta ttl; in TEST_F()
253 auto extended = DelegateToUser(root, base::TimeDelta::FromSeconds(1000), in TEST_F()
260 auth_.CreateAccessTokenFromAuth(extended, base::TimeDelta::FromDays(1), in TEST_F()
[all …]
Dwifi_bootstrap_manager.cc62 base::TimeDelta::FromSeconds(kMonitoringWithSsidTimeoutSeconds)); in Init()
64 StartMonitoring(base::TimeDelta::FromSeconds(kMonitoringTimeoutSeconds)); in Init()
75 StartMonitoring(base::TimeDelta::FromSeconds(kMonitoringTimeoutSeconds)); in StartBootstrapping()
87 base::TimeDelta::FromSeconds(kBootstrapTimeoutSeconds)); in StartBootstrapping()
110 base::TimeDelta::FromSeconds(kConnectingTimeoutSeconds)); in StartConnecting()
118 void WifiBootstrapManager::StartMonitoring(const base::TimeDelta& timeout) { in StartMonitoring()
123 void WifiBootstrapManager::ContinueMonitoring(const base::TimeDelta& timeout) { in ContinueMonitoring()
193 base::TimeDelta::FromSeconds(1)); in ConfigureCredentials()
228 StartMonitoring(base::TimeDelta::FromSeconds(kMonitoringTimeoutSeconds)); in OnConnectDone()
241 StartMonitoring(base::TimeDelta::FromSeconds(kMonitoringTimeoutSeconds)); in OnBootstrapTimeout()
[all …]
/external/libchrome/base/metrics/
Dhistogram_macros.h94 name, sample, base::TimeDelta::FromMilliseconds(1), \
95 base::TimeDelta::FromSeconds(10), 50)
162 name, sample, base::TimeDelta::FromMilliseconds(1), \
163 base::TimeDelta::FromSeconds(10), 50)
166 name, sample, base::TimeDelta::FromMilliseconds(10), \
167 base::TimeDelta::FromMinutes(3), 50)
171 name, sample, base::TimeDelta::FromMilliseconds(1), \
172 base::TimeDelta::FromHours(1), 50)
177 name, sample, base::TimeDelta::FromMilliseconds(1), \
178 base::TimeDelta::FromHours(1), 100)
[all …]
/external/libchrome/base/process/
Dprocess_posix.cc28 base::TimeDelta wait) { in WaitpidWithTimeout()
53 if (wait == base::TimeDelta::Max()) { in WaitpidWithTimeout()
93 base::TimeDelta wait) { in WaitForSingleNonChildProcess()
95 DCHECK_GT(wait, base::TimeDelta()); in WaitForSingleNonChildProcess()
119 bool wait_forever = (wait == base::TimeDelta::Max()); in WaitForSingleNonChildProcess()
120 base::TimeDelta remaining_delta; in WaitForSingleNonChildProcess()
131 while (wait_forever || remaining_delta > base::TimeDelta()) { in WaitForSingleNonChildProcess()
183 base::TimeDelta timeout) { in WaitForExitWithTimeoutImpl()
348 return WaitForExitWithTimeout(TimeDelta::Max(), exit_code); in WaitForExit()
351 bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) { in WaitForExitWithTimeout()

12345678910