Home
last modified time | relevance | path

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

123456789

/external/libchrome/base/time/
Dtime.h87 class TimeDelta; variable
96 BASE_EXPORT int64_t SaturatedAdd(TimeDelta delta, int64_t value);
97 BASE_EXPORT int64_t SaturatedSub(TimeDelta delta, int64_t value);
103 class BASE_EXPORT TimeDelta {
105 TimeDelta() : delta_(0) { in TimeDelta() function
109 static constexpr TimeDelta FromDays(int days);
110 static constexpr TimeDelta FromHours(int hours);
111 static constexpr TimeDelta FromMinutes(int minutes);
112 static constexpr TimeDelta FromSeconds(int64_t secs);
113 static constexpr TimeDelta FromMilliseconds(int64_t ms);
[all …]
Dtime_unittest.cc204 EXPECT_TRUE((a - b) < TimeDelta::FromSeconds(1)); in TEST_F()
214 EXPECT_TRUE((a - b) < TimeDelta::FromSeconds(1)); in TEST_F()
426 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1); in TEST_F()
438 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1000); in TEST_F()
450 t = Time::UnixEpoch() - TimeDelta::FromMicroseconds(1001); in TEST_F()
462 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1000); in TEST_F()
474 t = Time::UnixEpoch() - TimeDelta::FromMilliseconds(1001); in TEST_F()
499 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1); in TEST_F()
511 t = Time::UnixEpoch() + TimeDelta::FromMicroseconds(1000); in TEST_F()
523 t = Time::UnixEpoch() + TimeDelta::FromMilliseconds(1000); in TEST_F()
[all …]
Dtime.cc24 int TimeDelta::InDays() const { in InDays()
32 int TimeDelta::InHours() const { in InHours()
40 int TimeDelta::InMinutes() const { in InMinutes()
48 double TimeDelta::InSecondsF() const { in InSecondsF()
56 int64_t TimeDelta::InSeconds() const { in InSeconds()
64 double TimeDelta::InMillisecondsF() const { in InMillisecondsF()
72 int64_t TimeDelta::InMilliseconds() const { in InMilliseconds()
80 int64_t TimeDelta::InMillisecondsRoundedUp() const { in InMillisecondsRoundedUp()
89 int64_t TimeDelta::InMicroseconds() const { in InMicroseconds()
99 int64_t SaturatedAdd(TimeDelta delta, int64_t value) { in SaturatedAdd()
[all …]
/external/v8/src/base/platform/
Dtime.h32 class TimeDelta; variable
46 class V8_BASE_EXPORT TimeDelta final {
48 TimeDelta() : delta_(0) {} in TimeDelta() function
51 static TimeDelta FromDays(int days);
52 static TimeDelta FromHours(int hours);
53 static TimeDelta FromMinutes(int minutes);
54 static TimeDelta FromSeconds(int64_t seconds);
55 static TimeDelta FromMilliseconds(int64_t milliseconds);
56 static TimeDelta FromMicroseconds(int64_t microseconds) { in FromMicroseconds()
57 return TimeDelta(microseconds); in FromMicroseconds()
[all …]
Dtime.cc117 TimeDelta TimeDelta::FromDays(int days) { in FromDays()
118 return TimeDelta(days * Time::kMicrosecondsPerDay); in FromDays()
122 TimeDelta TimeDelta::FromHours(int hours) { in FromHours()
123 return TimeDelta(hours * Time::kMicrosecondsPerHour); in FromHours()
127 TimeDelta TimeDelta::FromMinutes(int minutes) { in FromMinutes()
128 return TimeDelta(minutes * Time::kMicrosecondsPerMinute); in FromMinutes()
132 TimeDelta TimeDelta::FromSeconds(int64_t seconds) { in FromSeconds()
133 return TimeDelta(seconds * Time::kMicrosecondsPerSecond); in FromSeconds()
137 TimeDelta TimeDelta::FromMilliseconds(int64_t milliseconds) { in FromMilliseconds()
138 return TimeDelta(milliseconds * Time::kMicrosecondsPerMillisecond); in FromMilliseconds()
[all …]
Delapsed-timer.h55 TimeDelta Restart() { in Restart()
58 TimeDelta elapsed = ticks - start_ticks_; in Restart()
67 TimeDelta Elapsed() const { in Elapsed()
69 TimeDelta elapsed = Now() - start_ticks_; in Elapsed()
77 bool HasExpired(TimeDelta time_delta) const { in HasExpired()
/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/libchrome/base/timer/
Dtimer_unittest.cc65 const TimeDelta& delay = TimeDelta::FromMilliseconds(10)) in OneShotTimerTesterBase()
78 TimeDelta delay() const { return delay_; } in delay()
92 const TimeDelta delay_;
105 const TimeDelta& delay = TimeDelta::FromMilliseconds(10)) in OneShotTimerTester()
157 explicit RepeatingTimerTester(WaitableEvent* did_run, const TimeDelta& delay) in RepeatingTimerTester()
194 const TimeDelta delay_;
249 const TimeDelta& delay) { in RunTest_RepeatingTimer()
258 const TimeDelta& delay) { in RunTest_RepeatingTimer_Cancel()
299 DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_NoCall()
313 DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, in RunTest_DelayTimer_OneCall()
[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.h86 TimeDelta delay,
90 TimeDelta delay,
101 virtual TimeDelta GetCurrentDelay() const;
111 TimeDelta delay,
132 TimeDelta delay,
150 void PostNewScheduledTask(TimeDelta delay);
183 TimeDelta delay_;
241 TimeDelta delay, in Start()
282 TimeDelta delay, in DelayTimer()
289 TimeDelta delay, in DelayTimer()
Dtimer.cc78 TimeDelta delay, in Timer()
84 TimeDelta delay, in Timer()
106 TimeDelta Timer::GetCurrentDelay() const { in GetCurrentDelay()
117 TimeDelta delay, in Start()
139 if (delay_ > TimeDelta::FromMicroseconds(0)) in Reset()
161 TimeDelta delay, in SetTaskInfo()
168 void Timer::PostNewScheduledTask(TimeDelta delay) { in PostNewScheduledTask()
172 if (delay > TimeDelta::FromMicroseconds(0)) { in PostNewScheduledTask()
/external/libchrome/base/synchronization/
Dcondition_variable_unittest.cc38 const TimeDelta kZeroMs;
39 const TimeDelta kTenMs;
40 const TimeDelta kThirtyMs;
41 const TimeDelta kFortyFiveMs;
42 const TimeDelta kSixtyMs;
43 const TimeDelta kOneHundredMs;
46 : kZeroMs(TimeDelta::FromMilliseconds(0)), in ConditionVariableTest()
47 kTenMs(TimeDelta::FromMilliseconds(10)), in ConditionVariableTest()
48 kThirtyMs(TimeDelta::FromMilliseconds(30)), in ConditionVariableTest()
49 kFortyFiveMs(TimeDelta::FromMilliseconds(45)), in ConditionVariableTest()
[all …]
Dwaitable_event_unittest.cc31 EXPECT_FALSE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
35 EXPECT_TRUE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
50 EXPECT_FALSE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
54 EXPECT_FALSE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
57 EXPECT_TRUE(event.TimedWait(TimeDelta::FromMilliseconds(10))); in TEST()
121 WaitableEventSignaler(TimeDelta delay, WaitableEvent* event) in WaitableEventSignaler()
132 const TimeDelta delay_;
143 WaitableEventSignaler signaler(TimeDelta::FromMilliseconds(10), ev); in TEST()
162 WaitableEventSignaler signaler(TimeDelta::FromMilliseconds(10), ev[2]); in TEST()
182 TimeDelta thread_delay = TimeDelta::FromMilliseconds(10); 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/libbrillo/brillo/message_loops/
Dfake_message_loop_unittest.cc20 using base::TimeDelta;
52 TimeDelta::FromSeconds(1)); in TEST_F()
54 TimeDelta::FromSeconds(4)); in TEST_F()
56 TimeDelta::FromSeconds(3)); in TEST_F()
58 TimeDelta::FromSeconds(2)); in TEST_F()
68 loop_->PostDelayedTask(Bind(&base::DoNothing), TimeDelta::FromSeconds(1)); in TEST_F()
69 loop_->PostDelayedTask(Bind(&base::DoNothing), TimeDelta::FromSeconds(2)); in TEST_F()
77 EXPECT_EQ(start + TimeDelta::FromSeconds(1), clock_.Now()); in TEST_F()
81 clock_.SetNow(start + TimeDelta::FromSeconds(3)); in TEST_F()
84 EXPECT_EQ(start + TimeDelta::FromSeconds(3), clock_.Now()); in TEST_F()
[all …]
/external/libchrome/base/test/
Dtest_timeouts.h24 static base::TimeDelta tiny_timeout() { in tiny_timeout()
26 return base::TimeDelta::FromMilliseconds(tiny_timeout_ms_); in tiny_timeout()
31 static base::TimeDelta action_timeout() { in action_timeout()
33 return base::TimeDelta::FromMilliseconds(action_timeout_ms_); in action_timeout()
39 static base::TimeDelta action_max_timeout() { in action_max_timeout()
41 return base::TimeDelta::FromMilliseconds(action_max_timeout_ms_); in action_max_timeout()
46 static base::TimeDelta test_launcher_timeout() { in test_launcher_timeout()
48 return base::TimeDelta::FromMilliseconds(test_launcher_timeout_ms_); in test_launcher_timeout()
Dtest_mock_time_task_runner.cc86 TimeDelta delay,
111 TimeDelta delay, in TestOrderedPendingTask()
159 void TestMockTimeTaskRunner::FastForwardBy(TimeDelta delta) { in FastForwardBy()
161 DCHECK_GE(delta, TimeDelta()); in FastForwardBy()
170 ProcessAllTasksNoLaterThan(TimeDelta()); in RunUntilIdle()
175 ProcessAllTasksNoLaterThan(TimeDelta::Max()); in FastForwardUntilNoTasksRemain()
228 TimeDelta TestMockTimeTaskRunner::NextPendingTaskDelay() const { in NextPendingTaskDelay()
230 return tasks_.empty() ? TimeDelta::Max() in NextPendingTaskDelay()
244 TimeDelta delay) { in PostDelayedTask()
255 TimeDelta delay) { in PostNonNestableDelayedTask()
[all …]
Dtest_simple_task_runner.h20 class TimeDelta; variable
48 TimeDelta delay) override;
51 TimeDelta delay) override;
58 base::TimeDelta NextPendingTaskDelay() const;
59 base::TimeDelta FinalPendingTaskDelay() const;
Dtest_mock_time_task_runner.h109 void FastForwardBy(TimeDelta delta);
139 TimeDelta NextPendingTaskDelay() const;
145 TimeDelta delay) override;
148 TimeDelta delay) override;
188 void ProcessAllTasksNoLaterThan(TimeDelta max_delta);
199 const TimeDelta& max_delta,
/external/libmojo/mojo/common/
Dtime_struct_traits.h21 base::Time() + base::TimeDelta::FromMicroseconds(data.internal_value());
27 struct StructTraits<common::mojom::TimeDeltaDataView, base::TimeDelta> {
28 static int64_t microseconds(const base::TimeDelta& delta) {
33 base::TimeDelta* delta) {
34 *delta = base::TimeDelta::FromMicroseconds(data.microseconds());
48 base::TimeDelta::FromMicroseconds(data.internal_value());
/external/libchrome/base/metrics/
Dhistogram_macros.h146 name, sample, base::TimeDelta::FromMilliseconds(1), \
147 base::TimeDelta::FromSeconds(10), 50)
152 name, sample, base::TimeDelta::FromMilliseconds(10), \
153 base::TimeDelta::FromMinutes(3), 50)
157 name, sample, base::TimeDelta::FromMilliseconds(1), \
158 base::TimeDelta::FromHours(1), 50)
162 name, sample, base::TimeDelta::FromMilliseconds(1), \
163 base::TimeDelta::FromHours(1), 100)
/external/libchrome/base/process/
Dprocess_posix.cc30 base::TimeDelta wait) { in WaitpidWithTimeout()
55 if (wait == base::TimeDelta::Max()) { in WaitpidWithTimeout()
95 base::TimeDelta wait) { in WaitForSingleNonChildProcess()
97 DCHECK_GT(wait, base::TimeDelta()); in WaitForSingleNonChildProcess()
120 bool wait_forever = (wait == base::TimeDelta::Max()); in WaitForSingleNonChildProcess()
121 base::TimeDelta remaining_delta; in WaitForSingleNonChildProcess()
131 while (wait_forever || remaining_delta > base::TimeDelta()) { in WaitForSingleNonChildProcess()
183 base::TimeDelta timeout) { in WaitForExitWithTimeoutImpl()
359 return WaitForExitWithTimeout(TimeDelta::Max(), exit_code); in WaitForExit()
362 bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) const { in WaitForExitWithTimeout()
/external/v4l2_codec2/vda/
Dbitstream_buffer.h19 constexpr base::TimeDelta kNoTimestamp =
20 base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::min());
38 base::TimeDelta presentation_timestamp = kNoTimestamp);
55 base::TimeDelta presentation_timestamp() const { in presentation_timestamp()
70 base::TimeDelta presentation_timestamp_;
/external/v8/tools/
Dparser-shell.cc62 std::pair<v8::base::TimeDelta, v8::base::TimeDelta> RunBaselineParser( in RunBaselineParser()
90 v8::base::TimeDelta parse_time1, parse_time2; in RunBaselineParser()
106 return std::make_pair(v8::base::TimeDelta(), v8::base::TimeDelta()); in RunBaselineParser()
120 return std::make_pair(v8::base::TimeDelta(), v8::base::TimeDelta()); in RunBaselineParser()
170 std::pair<v8::base::TimeDelta, v8::base::TimeDelta> time = in main()

123456789