Home
last modified time | relevance | path

Searched refs:Duration (Results 1 – 25 of 791) sorted by relevance

12345678910>>...32

/external/opencensus-java/api/src/test/java/io/opencensus/common/
DDurationTest.java34 assertThat(Duration.create(24, 42).getSeconds()).isEqualTo(24); in testDurationCreate()
35 assertThat(Duration.create(24, 42).getNanos()).isEqualTo(42); in testDurationCreate()
36 assertThat(Duration.create(-24, -42).getSeconds()).isEqualTo(-24); in testDurationCreate()
37 assertThat(Duration.create(-24, -42).getNanos()).isEqualTo(-42); in testDurationCreate()
38 assertThat(Duration.create(315576000000L, 999999999).getSeconds()).isEqualTo(315576000000L); in testDurationCreate()
39 assertThat(Duration.create(315576000000L, 999999999).getNanos()).isEqualTo(999999999); in testDurationCreate()
40 assertThat(Duration.create(-315576000000L, -999999999).getSeconds()).isEqualTo(-315576000000L); in testDurationCreate()
41 assertThat(Duration.create(-315576000000L, -999999999).getNanos()).isEqualTo(-999999999); in testDurationCreate()
48 Duration.create(-315576000001L, 0); in create_SecondsTooLow()
55 Duration.create(315576000001L, 0); in create_SecondsTooHigh()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
58 Assert.AreEqual(new Duration { Seconds = 2, Nanos = 100000000 }, in Addition()
59 … new Duration { Seconds = 1, Nanos = 600000000 } + new Duration { Nanos = 500000000 }); in Addition()
[all …]
/external/protobuf/src/google/protobuf/util/
Dtime_util.h52 typedef google::protobuf::Duration Duration; typedef
88 static string ToString(const Duration& duration);
89 static bool FromString(const string& value, Duration* timestamp);
101 static Duration NanosecondsToDuration(int64 nanos);
102 static Duration MicrosecondsToDuration(int64 micros);
103 static Duration MillisecondsToDuration(int64 millis);
104 static Duration SecondsToDuration(int64 seconds);
105 static Duration MinutesToDuration(int64 minutes);
106 static Duration HoursToDuration(int64 hours);
114 static int64 DurationToNanoseconds(const Duration& duration);
[all …]
Dtime_util.cc45 using google::protobuf::Duration;
82 Duration CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized()
98 Duration result; in CreateNormalized()
168 string TimeUtil::ToString(const Duration& duration) { in ToString()
193 bool TimeUtil::FromString(const string& value, Duration* duration) { in FromString()
230 Duration TimeUtil::NanosecondsToDuration(int64 nanos) { in NanosecondsToDuration()
231 return CreateNormalized<Duration>(nanos / kNanosPerSecond, in NanosecondsToDuration()
235 Duration TimeUtil::MicrosecondsToDuration(int64 micros) { in MicrosecondsToDuration()
236 return CreateNormalized<Duration>( in MicrosecondsToDuration()
241 Duration TimeUtil::MillisecondsToDuration(int64 millis) { in MillisecondsToDuration()
[all …]
/external/protobuf/src/google/protobuf/
Dduration.pb.cc40 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Duration, seconds_), in protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto()
41 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Duration, nanos_), in protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto()
46 Duration::default_instance_, in protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto()
51 sizeof(Duration), in protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto()
52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Duration, _internal_metadata_), in protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto()
53 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Duration, _is_default_instance_)); in protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto()
67 Duration_descriptor_, &Duration::default_instance()); in protobuf_RegisterTypes()
73 delete Duration::default_instance_; in protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto()
92 Duration::default_instance_ = new Duration(); in protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto()
93 Duration::default_instance_->InitAsDefaultInstance(); in protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto()
[all …]
Dduration.pb.h40 class Duration; variable
44 class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message {
46 Duration();
47 virtual ~Duration();
49 Duration(const Duration& from);
51 inline Duration& operator=(const Duration& from) {
57 static const Duration& default_instance();
59 void Swap(Duration* other);
63 inline Duration* New() const { return New(NULL); } in New()
65 Duration* New(::google::protobuf::Arena* arena) const;
[all …]
/external/golang-protobuf/ptypes/
Dduration_test.go49 proto *durpb.Duration
52 dur time.Duration
55 {&durpb.Duration{Seconds: 0, Nanos: 0}, true, true, 0},
57 {&durpb.Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second},
58 {&durpb.Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second},
59 {&durpb.Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987},
60 {&durpb.Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)},
62 …{&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, tru…
64 …{&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, tru…
66 {&durpb.Duration{Seconds: -100, Nanos: 987}, false, false, 0},
[all …]
Dduration.go56 func validateDuration(d *durpb.Duration) error { argument
76 func Duration(p *durpb.Duration) (time.Duration, error) { func
80 d := time.Duration(p.Seconds) * time.Second
85 d += time.Duration(p.Nanos) * time.Nanosecond
94 func DurationProto(d time.Duration) *durpb.Duration { argument
98 return &durpb.Duration{
/external/tensorflow/tensorflow/core/grappler/costs/
Dop_level_cost_estimator_test.cc529 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F()
530 EXPECT_EQ(Costs::Duration(1), cost.compute_time); in TEST_F()
531 EXPECT_EQ(Costs::Duration(1), cost.execution_time); in TEST_F()
549 EXPECT_EQ(Costs::Duration(130), cost.memory_time); in TEST_F()
550 EXPECT_EQ(Costs::Duration(16), cost.compute_time); in TEST_F()
551 EXPECT_EQ(Costs::Duration(146), cost.execution_time); in TEST_F()
567 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F()
568 EXPECT_EQ(Costs::Duration(0), cost.compute_time); in TEST_F()
569 EXPECT_EQ(Costs::Duration(0), cost.execution_time); in TEST_F()
587 EXPECT_EQ(Costs::Duration(81), cost.memory_time); in TEST_F()
[all …]
Dcost_estimator.h122 typedef NanoSeconds Duration; typedef
125 Duration execution_time;
128 Duration compute_time;
131 Duration memory_time;
134 Duration intermediate_memory_time;
135 Duration intermediate_memory_read_time; // Intermediate memory read cost.
136 Duration intermediate_memory_write_time; // Intermediate memory write cost.
180 execution_time = Duration::zero(); in Costs()
181 compute_time = Duration::zero(); in Costs()
182 memory_time = Duration::zero(); in Costs()
[all …]
/external/golang-protobuf/ptypes/duration/
Dduration.pb.go83 type Duration struct { struct
100 func (m *Duration) Reset() { *m = Duration{} } argument
101 func (m *Duration) String() string { return proto.CompactTextString(m) } argument
102 func (*Duration) ProtoMessage() {} argument
103 func (*Duration) Descriptor() ([]byte, []int) { argument
107 func (*Duration) XXX_WellKnownType() string { return "Duration" } argument
109 func (m *Duration) XXX_Unmarshal(b []byte) error { argument
112 func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { argument
115 func (m *Duration) XXX_Merge(src proto.Message) { argument
118 func (m *Duration) XXX_Size() int { argument
[all …]
/external/syzkaller/vendor/github.com/golang/protobuf/ptypes/duration/
Dduration.pb.go81 type Duration struct { struct
98 func (m *Duration) Reset() { *m = Duration{} } argument
99 func (m *Duration) String() string { return proto.CompactTextString(m) } argument
100 func (*Duration) ProtoMessage() {} argument
101 func (*Duration) Descriptor() ([]byte, []int) { argument
104 func (*Duration) XXX_WellKnownType() string { return "Duration" } argument
105 func (m *Duration) XXX_Unmarshal(b []byte) error { argument
108 func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { argument
111 func (dst *Duration) XXX_Merge(src proto.Message) { argument
114 func (m *Duration) XXX_Size() int { argument
[all …]
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/
DTimeUtil.java33 import com.google.protobuf.Duration;
192 public static String toString(Duration duration) in toString()
226 public static Duration parseDuration(String value) throws ParseException { in parseDuration()
270 public static Duration createDurationFromMillis(long milliseconds) { in createDurationFromMillis()
292 public static long toMillis(Duration duration) { in toMillis()
308 public static Duration createDurationFromMicros(long microseconds) { in createDurationFromMicros()
330 public static long toMicros(Duration duration) { in toMicros()
346 public static Duration createDurationFromNanos(long nanoseconds) { in createDurationFromNanos()
361 public static long toNanos(Duration duration) { in toNanos()
382 public static Duration distance(Timestamp from, Timestamp to) { in distance()
[all …]
/external/libcxx/test/std/utilities/time/time.point/time.point.cons/
Dduration.pass.cpp24 typedef std::chrono::milliseconds Duration; in main() typedef
26 std::chrono::time_point<Clock, Duration> t(Duration(3)); in main()
27 assert(t.time_since_epoch() == Duration(3)); in main()
30 std::chrono::time_point<Clock, Duration> t(std::chrono::seconds(3)); in main()
31 assert(t.time_since_epoch() == Duration(3000)); in main()
35 constexpr std::chrono::time_point<Clock, Duration> t(Duration(3)); in main()
36 static_assert(t.time_since_epoch() == Duration(3), ""); in main()
39 constexpr std::chrono::time_point<Clock, Duration> t(std::chrono::seconds(3)); in main()
40 static_assert(t.time_since_epoch() == Duration(3000), ""); in main()
/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DDuration.cs35 …(typeof(global::Google.Protobuf.WellKnownTypes.Duration), global::Google.Protobuf.WellKnownTypes.D… in DurationReflection()
85 public sealed partial class Duration : pb::IMessage<Duration> { class
86 …rivate static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() =>…
87 public static pb::MessageParser<Duration> Parser { get { return _parser; } }
97 public Duration() { in Duration() method in Google.Protobuf.WellKnownTypes.Duration
103 public Duration(Duration other) : this() { in Duration() method in Google.Protobuf.WellKnownTypes.Duration
108 public Duration Clone() { in Clone()
109 return new Duration(this); in Clone()
145 return Equals(other as Duration); in Equals()
148 public bool Equals(Duration other) { in Equals()
[all …]
DDurationPartial.cs41 public partial class Duration : ICustomDiagnosticMessage class
103 public static Duration FromTimeSpan(TimeSpan timeSpan) in FromTimeSpan()
110 return new Duration { Seconds = seconds, Nanos = nanos }; in FromTimeSpan()
119 public static Duration operator -(Duration value) in operator -()
134 public static Duration operator +(Duration lhs, Duration rhs) in operator +()
150 public static Duration operator -(Duration lhs, Duration rhs) in operator -()
164 internal static Duration Normalize(long seconds, int nanoseconds) in Normalize()
182 return new Duration { Seconds = seconds, Nanos = nanoseconds }; in Normalize()
/external/libcxx/test/std/utilities/time/time.point/time.point.arithmetic/
Dop_+=.pass.cpp26 typedef std::chrono::milliseconds Duration; in constexpr_test() typedef
27 std::chrono::time_point<Clock, Duration> t(Duration(5)); in constexpr_test()
28 t += Duration(4); in constexpr_test()
29 return t.time_since_epoch() == Duration(9); in constexpr_test()
37 typedef std::chrono::milliseconds Duration; in main() typedef
38 std::chrono::time_point<Clock, Duration> t(Duration(3)); in main()
39 t += Duration(2); in main()
40 assert(t.time_since_epoch() == Duration(5)); in main()
Dop_-=.pass.cpp26 typedef std::chrono::milliseconds Duration; in constexpr_test() typedef
27 std::chrono::time_point<Clock, Duration> t(Duration(5)); in constexpr_test()
28 t -= Duration(4); in constexpr_test()
29 return t.time_since_epoch() == Duration(1); in constexpr_test()
37 typedef std::chrono::milliseconds Duration; in main() typedef
38 std::chrono::time_point<Clock, Duration> t(Duration(3)); in main()
39 t -= Duration(2); in main()
40 assert(t.time_since_epoch() == Duration(1)); in main()
/external/Reactive-Extensions/RxCpp/Rx/v2/src/rxcpp/operators/
Drx-window_time.hpp58 template<class T, class Duration, class Coordination>
65 typedef rxu::decay_t<Duration> duration_type;
262 template<class Observable, class Duration,
265 std::is_convertible<Duration, rxsc::scheduler::clock_type::duration>>,
267 …class WindowWithTime = rxo::detail::window_with_time<SourceValue, rxu::decay_t<Duration>, identity…
269 static auto member(Observable&& o, Duration period) in member()
274 template<class Observable, class Duration, class Coordination,
277 std::is_convertible<Duration, rxsc::scheduler::clock_type::duration>,
280 …class WindowWithTime = rxo::detail::window_with_time<SourceValue, rxu::decay_t<Duration>, rxu::dec…
282 static auto member(Observable&& o, Duration period, Coordination&& cn) in member()
[all …]
Drx-buffer_time.hpp66 template<class T, class Duration, class Coordination>
73 typedef rxu::decay_t<Duration> duration_type;
266 template<class Observable, class Duration,
269 std::is_convertible<Duration, rxsc::scheduler::clock_type::duration>>,
271 …class BufferWithTime = rxo::detail::buffer_with_time<SourceValue, rxu::decay_t<Duration>, identity…
273 static auto member(Observable&& o, Duration period) in member()
278 template<class Observable, class Duration, class Coordination,
281 std::is_convertible<Duration, rxsc::scheduler::clock_type::duration>,
284 …class BufferWithTime = rxo::detail::buffer_with_time<SourceValue, rxu::decay_t<Duration>, rxu::dec…
286 static auto member(Observable&& o, Duration period, Coordination&& cn) in member()
[all …]
Drx-sample_time.hpp43 template<class T, class Duration, class Coordination>
49 typedef rxu::decay_t<Duration> duration_type;
211 template<class Observable, class Duration,
214 rxu::is_duration<Duration>>,
216 …class SampleWithTime = rxo::detail::sample_with_time<SourceValue, rxu::decay_t<Duration>, identity…
217 static auto member(Observable&& o, Duration&& d) in member()
218 …-> decltype(o.template lift<SourceValue>(SampleWithTime(std::forward<Duration>(d), identity_curren… in member()
219 …return o.template lift<SourceValue>(SampleWithTime(std::forward<Duration>(d), identity_curren… in member()
222 template<class Observable, class Coordination, class Duration,
226 rxu::is_duration<Duration>>,
[all …]
Drx-delay.hpp43 template<class T, class Duration, class Coordination>
49 typedef rxu::decay_t<Duration> duration_type;
192 template<class Observable, class Duration,
195 rxu::is_duration<Duration>>,
197 class delay = rxo::detail::delay<SourceValue, rxu::decay_t<Duration>, identity_one_worker>>
198 static auto member(Observable&& o, Duration&& d) in member()
199 …-> decltype(o.template lift<SourceValue>(delay(std::forward<Duration>(d), identity_current_thread(… in member()
200 …return o.template lift<SourceValue>(delay(std::forward<Duration>(d), identity_current_thread(… in member()
203 template<class Observable, class Coordination, class Duration,
207 rxu::is_duration<Duration>>,
[all …]
Drx-timeout.hpp51 template<class T, class Duration, class Coordination>
57 typedef rxu::decay_t<Duration> duration_type;
239 template<class Observable, class Duration,
242 rxu::is_duration<Duration>>,
244 … class Timeout = rxo::detail::timeout<SourceValue, rxu::decay_t<Duration>, identity_one_worker>>
245 static auto member(Observable&& o, Duration&& d) in member()
246 …-> decltype(o.template lift<SourceValue>(Timeout(std::forward<Duration>(d), identity_current_threa… in member()
247 …return o.template lift<SourceValue>(Timeout(std::forward<Duration>(d), identity_current_threa… in member()
250 template<class Observable, class Coordination, class Duration,
254 rxu::is_duration<Duration>>,
[all …]
/external/syzkaller/vendor/google.golang.org/grpc/keepalive/
Dkeepalive.go33 Time time.Duration // The current default value is infinity.
36 Timeout time.Duration // The current default value is 20 seconds.
45 MaxConnectionIdle time.Duration // The current default value is infinity.
48 MaxConnectionAge time.Duration // The current default value is infinity.
50 MaxConnectionAgeGrace time.Duration // The current default value is infinity.
52 Time time.Duration // The current default value is 2 hours.
55 Timeout time.Duration // The current default value is 20 seconds.
62 MinTime time.Duration // The current default value is 5 minutes.
/external/syzkaller/vendor/github.com/golang/protobuf/ptypes/
Dduration.go56 func validateDuration(d *durpb.Duration) error { argument
76 func Duration(p *durpb.Duration) (time.Duration, error) { argument
80 d := time.Duration(p.Seconds) * time.Second
85 d += time.Duration(p.Nanos)
94 func DurationProto(d time.Duration) *durpb.Duration { argument
98 return &durpb.Duration{

12345678910>>...32