/external/rust/crates/chrono/src/ |
D | oldtime.rs | 14 use core::time::Duration as StdDuration; 50 pub struct Duration { struct 56 pub const MIN: Duration = Duration { 62 pub const MAX: Duration = Duration { 67 impl Duration { implementation 72 pub fn weeks(weeks: i64) -> Duration { in weeks() argument 74 Duration::seconds(secs) in weeks() 81 pub fn days(days: i64) -> Duration { in days() argument 83 Duration::seconds(secs) in days() 90 pub fn hours(hours: i64) -> Duration { in hours() argument [all …]
|
/external/opencensus-java/api/src/test/java/io/opencensus/common/ |
D | DurationTest.java | 34 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/ |
D | DurationTest.cs | 43 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/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/ |
D | DurationTest.cs | 43 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/llvm-project/clang-tools-extra/test/clang-tidy/checkers/Inputs/absl/time/ |
D | time.h | 6 class Duration { 8 Duration &operator*=(int64_t r); 9 Duration &operator*=(float r); 10 Duration &operator*=(double r); 11 template <typename T> Duration &operator*=(T r); 13 Duration &operator/=(int64_t r); 14 Duration &operator/=(float r); 15 Duration &operator/=(double r); 16 template <typename T> Duration &operator/=(T r); 18 Duration &operator+(Duration d); [all …]
|
/external/protobuf/src/google/protobuf/util/ |
D | time_util.h | 64 typedef google::protobuf::Duration Duration; typedef 100 static std::string ToString(const Duration& duration); 101 static bool FromString(const std::string& value, Duration* timestamp); 113 static Duration NanosecondsToDuration(int64 nanos); 114 static Duration MicrosecondsToDuration(int64 micros); 115 static Duration MillisecondsToDuration(int64 millis); 116 static Duration SecondsToDuration(int64 seconds); 117 static Duration MinutesToDuration(int64 minutes); 118 static Duration HoursToDuration(int64 hours); 126 static int64 DurationToNanoseconds(const Duration& duration); [all …]
|
D | time_util.cc | 48 using google::protobuf::Duration; 84 Duration CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() 100 Duration result; in CreateNormalized() 179 std::string TimeUtil::ToString(const Duration& duration) { in ToString() 204 bool TimeUtil::FromString(const std::string& value, Duration* duration) { in FromString() 241 Duration TimeUtil::NanosecondsToDuration(int64 nanos) { in NanosecondsToDuration() 242 return CreateNormalized<Duration>(nanos / kNanosPerSecond, in NanosecondsToDuration() 246 Duration TimeUtil::MicrosecondsToDuration(int64 micros) { in MicrosecondsToDuration() 247 return CreateNormalized<Duration>( in MicrosecondsToDuration() 252 Duration TimeUtil::MillisecondsToDuration(int64 millis) { in MillisecondsToDuration() [all …]
|
/external/openscreen/third_party/abseil/src/absl/time/ |
D | time.h | 94 class Duration; // Defined below variable 99 int64_t IDivDuration(bool satq, Duration num, Duration den, Duration* rem); 100 constexpr Time FromUnixDuration(Duration d); 101 constexpr Duration ToUnixDuration(Time t); 102 constexpr int64_t GetRepHi(Duration d); 103 constexpr uint32_t GetRepLo(Duration d); 104 constexpr Duration MakeDuration(int64_t hi, uint32_t lo); 105 constexpr Duration MakeDuration(int64_t hi, int64_t lo); 106 inline Duration MakePosDoubleDuration(double n); 110 constexpr Duration FromInt64(int64_t v, std::ratio<1, N>); [all …]
|
/external/webrtc/third_party/abseil-cpp/absl/time/ |
D | time.h | 94 class Duration; // Defined below variable 99 int64_t IDivDuration(bool satq, Duration num, Duration den, Duration* rem); 100 constexpr Time FromUnixDuration(Duration d); 101 constexpr Duration ToUnixDuration(Time t); 102 constexpr int64_t GetRepHi(Duration d); 103 constexpr uint32_t GetRepLo(Duration d); 104 constexpr Duration MakeDuration(int64_t hi, uint32_t lo); 105 constexpr Duration MakeDuration(int64_t hi, int64_t lo); 106 inline Duration MakePosDoubleDuration(double n); 110 constexpr Duration FromInt64(int64_t v, std::ratio<1, N>); [all …]
|
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/time/ |
D | time.h | 94 class Duration; // Defined below variable 99 int64_t IDivDuration(bool satq, Duration num, Duration den, Duration* rem); 100 constexpr Time FromUnixDuration(Duration d); 101 constexpr Duration ToUnixDuration(Time t); 102 constexpr int64_t GetRepHi(Duration d); 103 constexpr uint32_t GetRepLo(Duration d); 104 constexpr Duration MakeDuration(int64_t hi, uint32_t lo); 105 constexpr Duration MakeDuration(int64_t hi, int64_t lo); 106 inline Duration MakePosDoubleDuration(double n); 110 constexpr Duration FromInt64(int64_t v, std::ratio<1, N>); [all …]
|
D | duration.cc | 129 inline uint128 MakeU128Ticks(Duration d) { in MakeU128Ticks() 144 inline Duration MakeDurationFromU128(uint128 u128, bool is_neg) { in MakeDurationFromU128() 202 inline bool SafeAddRepHi(double a_hi, double b_hi, Duration* d) { in SafeAddRepHi() 236 inline Duration ScaleFixed(Duration d, int64_t r) { in ScaleFixed() 247 inline Duration ScaleDouble(Duration d, double r) { in ScaleDouble() 265 Duration ans; in ScaleDouble() 278 inline bool IDivFastPath(const Duration num, const Duration den, int64_t* q, in IDivFastPath() 279 Duration* rem) { in IDivFastPath() 358 int64_t IDivDuration(bool satq, const Duration num, const Duration den, in IDivDuration() 359 Duration* rem) { in IDivDuration() [all …]
|
/external/angle/third_party/abseil-cpp/absl/time/ |
D | time.h | 94 class Duration; // Defined below variable 99 int64_t IDivDuration(bool satq, Duration num, Duration den, Duration* rem); 100 constexpr Time FromUnixDuration(Duration d); 101 constexpr Duration ToUnixDuration(Time t); 102 constexpr int64_t GetRepHi(Duration d); 103 constexpr uint32_t GetRepLo(Duration d); 104 constexpr Duration MakeDuration(int64_t hi, uint32_t lo); 105 constexpr Duration MakeDuration(int64_t hi, int64_t lo); 106 inline Duration MakePosDoubleDuration(double n); 110 constexpr Duration FromInt64(int64_t v, std::ratio<1, N>); [all …]
|
/external/libtextclassifier/abseil-cpp/absl/time/ |
D | time.h | 94 class Duration; // Defined below variable 99 int64_t IDivDuration(bool satq, Duration num, Duration den, Duration* rem); 100 constexpr Time FromUnixDuration(Duration d); 101 constexpr Duration ToUnixDuration(Time t); 102 constexpr int64_t GetRepHi(Duration d); 103 constexpr uint32_t GetRepLo(Duration d); 104 constexpr Duration MakeDuration(int64_t hi, uint32_t lo); 105 constexpr Duration MakeDuration(int64_t hi, int64_t lo); 106 inline Duration MakePosDoubleDuration(double n); 110 constexpr Duration FromInt64(int64_t v, std::ratio<1, N>); [all …]
|
D | duration.cc | 129 inline uint128 MakeU128Ticks(Duration d) { in MakeU128Ticks() 144 inline Duration MakeDurationFromU128(uint128 u128, bool is_neg) { in MakeDurationFromU128() 202 inline bool SafeAddRepHi(double a_hi, double b_hi, Duration* d) { in SafeAddRepHi() 236 inline Duration ScaleFixed(Duration d, int64_t r) { in ScaleFixed() 247 inline Duration ScaleDouble(Duration d, double r) { in ScaleDouble() 265 Duration ans; in ScaleDouble() 278 inline bool IDivFastPath(const Duration num, const Duration den, int64_t* q, in IDivFastPath() 279 Duration* rem) { in IDivFastPath() 358 int64_t IDivDuration(bool satq, const Duration num, const Duration den, in IDivDuration() 359 Duration* rem) { in IDivDuration() [all …]
|
/external/abseil-cpp/absl/time/ |
D | time.h | 94 class Duration; // Defined below variable 99 int64_t IDivDuration(bool satq, Duration num, Duration den, Duration* rem); 100 constexpr Time FromUnixDuration(Duration d); 101 constexpr Duration ToUnixDuration(Time t); 102 constexpr int64_t GetRepHi(Duration d); 103 constexpr uint32_t GetRepLo(Duration d); 104 constexpr Duration MakeDuration(int64_t hi, uint32_t lo); 105 constexpr Duration MakeDuration(int64_t hi, int64_t lo); 106 inline Duration MakePosDoubleDuration(double n); 110 constexpr Duration FromInt64(int64_t v, std::ratio<1, N>); [all …]
|
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/ |
D | Durations.java | 46 import com.google.protobuf.Duration; 63 public static final Duration MIN_VALUE = 64 Duration.newBuilder().setSeconds(DURATION_SECONDS_MIN).setNanos(-999999999).build(); 67 public static final Duration MAX_VALUE = 68 Duration.newBuilder().setSeconds(DURATION_SECONDS_MAX).setNanos(999999999).build(); 71 public static final Duration ZERO = Duration.newBuilder().setSeconds(0L).setNanos(0).build(); 75 private static final Comparator<Duration> COMPARATOR = 76 new Comparator<Duration>() { 78 public int compare(Duration d1, Duration d2) { 90 public static Comparator<Duration> comparator() { in comparator() [all …]
|
D | TimeUtil.java | 33 import com.google.protobuf.Duration; 107 public static String toString(Duration duration) { in toString() 119 public static Duration parseDuration(String value) throws ParseException { in parseDuration() 139 public static Duration createDurationFromMillis(long milliseconds) { in createDurationFromMillis() 165 public static long toMillis(Duration duration) { in toMillis() 185 public static Duration createDurationFromMicros(long microseconds) { in createDurationFromMicros() 211 public static long toMicros(Duration duration) { in toMicros() 231 public static Duration createDurationFromNanos(long nanoseconds) { in createDurationFromNanos() 251 public static long toNanos(Duration duration) { in toNanos() 281 public static Duration distance(Timestamp from, Timestamp to) { in distance() [all …]
|
/external/protobuf/src/google/protobuf/ |
D | duration.pb.cc | 21 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Duration> _instance; 29 new (ptr) PROTOBUF_NAMESPACE_ID::Duration(); in InitDefaultsscc_info_Duration_google_2fprotobuf_2fduration_2eproto() 32 PROTOBUF_NAMESPACE_ID::Duration::InitAsDefaultInstance(); in InitDefaultsscc_info_Duration_google_2fprotobuf_2fduration_2eproto() 44 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, _internal_metadata_), 48 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, seconds_), 49 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, nanos_), 52 { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Duration)}, 87 void Duration::InitAsDefaultInstance() { in InitAsDefaultInstance() 89 class Duration::_Internal { 93 Duration::Duration() in Duration() function in Duration [all …]
|
D | duration.pb.h | 58 class Duration; variable 63 …e<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_… 69 class PROTOBUF_EXPORT Duration : 72 Duration(); 73 virtual ~Duration(); 75 Duration(const Duration& from); 76 Duration(Duration&& from) noexcept in Duration() function 77 : Duration() { in Duration() 81 inline Duration& operator=(const Duration& from) { 85 inline Duration& operator=(Duration&& from) noexcept { [all …]
|
/external/catch2/include/internal/benchmark/detail/ |
D | catch_analyse.hpp | 25 template <typename Duration, typename Iterator> 26 …SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterat… in analyse() argument 30 … std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); }); in analyse() 36 return Estimate<Duration> { in analyse() 37 Duration(e.point), in analyse() 38 Duration(e.lower_bound), in analyse() 39 Duration(e.upper_bound), in analyse() 43 std::vector<Duration> samples2; in analyse() 45 …amples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); }); in analyse() 54 std::vector<Duration> samples; in analyse() [all …]
|
/external/golang-protobuf/ptypes/ |
D | duration_test.go | 49 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 …]
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
D | op_level_cost_estimator_test.cc | 61 EXPECT_EQ(cost.compute_time, Costs::Duration::zero()); in ExpectZeroCost() 62 EXPECT_EQ(cost.execution_time, Costs::Duration::zero()); in ExpectZeroCost() 63 EXPECT_EQ(cost.memory_time, Costs::Duration::zero()); in ExpectZeroCost() 641 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F() 642 EXPECT_EQ(Costs::Duration(1), cost.compute_time); in TEST_F() 643 EXPECT_EQ(Costs::Duration(1), cost.execution_time); in TEST_F() 666 EXPECT_EQ(Costs::Duration(130), cost.memory_time); in TEST_F() 667 EXPECT_EQ(Costs::Duration(16), cost.compute_time); in TEST_F() 668 EXPECT_EQ(Costs::Duration(146), cost.execution_time); in TEST_F() 687 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F() [all …]
|
/external/golang-protobuf/ptypes/duration/ |
D | duration.pb.go | 83 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/rust/crates/instant/src/ |
D | wasm.rs | 2 use std::time::Duration; 5 pub struct Instant(Duration); 22 pub fn duration_since(&self, earlier: Instant) -> Duration { in duration_since() argument 31 pub fn elapsed(&self) -> Duration { in elapsed() argument 39 pub fn checked_add(&self, duration: Duration) -> Option<Instant> { in checked_add() 47 pub fn checked_sub(&self, duration: Duration) -> Option<Instant> { in checked_sub() 52 impl Add<Duration> for Instant { 56 fn add(self, rhs: Duration) -> Self { in add() 61 impl AddAssign<Duration> for Instant { 63 fn add_assign(&mut self, rhs: Duration) { in add_assign() argument [all …]
|
/external/rust/crates/quiche/src/ |
D | minmax.rs | 55 use std::time::Duration; 90 pub fn running_min(&mut self, win: Duration, time: Instant, meas: T) -> T { in running_min() argument 111 pub fn _running_max(&mut self, win: Duration, time: Instant, meas: T) -> T { in _running_max() argument 132 fn subwin_update(&mut self, win: Duration, time: Instant, meas: T) -> T { in subwin_update() argument 176 let mut f = Minmax::new(Duration::new(0, 0)); in reset_filter_rtt() 178 let rtt = Duration::from_millis(50); in reset_filter_rtt() 214 let mut f = Minmax::new(Duration::new(0, 0)); in get_windowed_min_rtt() 215 let rtt_25 = Duration::from_millis(25); in get_windowed_min_rtt() 216 let rtt_24 = Duration::from_millis(24); in get_windowed_min_rtt() 217 let win = Duration::from_millis(500); in get_windowed_min_rtt() [all …]
|