Home
last modified time | relevance | path

Searched refs:Nanos (Results 1 – 17 of 17) sorted by relevance

/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs45 … 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()
60 Assert.AreEqual(new Duration { Seconds = -2, Nanos = -100000000 }, in Addition()
61 … new Duration { Seconds = -1, Nanos = -600000000 } + new Duration { Nanos = -500000000 }); in Addition()
[all …]
DTimestampTest.cs46 AssertRoundtrip(new Timestamp { Seconds = 253402300799, Nanos = 999999900 }, utcMax); in FromAndToDateTime()
48 …AssertRoundtrip(new Timestamp { Nanos = 1000000}, new DateTime(1970, 1, 1, 0, 0, 0, 1, DateTimeKin… in FromAndToDateTime()
49 …AssertRoundtrip(new Timestamp { Seconds = -1, Nanos = 999000000 }, new DateTime(1969, 12, 31, 23, … in FromAndToDateTime()
57 … var t1 = new Timestamp { Seconds = 1, Nanos = 1000000 + Duration.NanosecondsPerTick - 1 }; in ToDateTimeTruncation()
60 … var t2 = new Timestamp { Seconds = -1, Nanos = 1000000 + Duration.NanosecondsPerTick - 1 }; in ToDateTimeTruncation()
71 var value = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in ToDateTime_OutOfRange()
83 var value = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in ToDateTime_ValidBoundaries()
97 Timestamp t1 = new Timestamp { Seconds = 10000, Nanos = 5000 }; in Arithmetic()
98 Timestamp t2 = new Timestamp { Seconds = 8000, Nanos = 10000 }; in Arithmetic()
99 …Duration difference = new Duration { Seconds = 1999, Nanos = Duration.NanosecondsPerSecond - 5000 … in Arithmetic()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs45 … 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()
60 Assert.AreEqual(new Duration { Seconds = -2, Nanos = -100000000 }, in Addition()
61 … new Duration { Seconds = -1, Nanos = -600000000 } + new Duration { Nanos = -500000000 }); in Addition()
[all …]
DTimestampTest.cs46 AssertRoundtrip(new Timestamp { Seconds = 253402300799, Nanos = 999999900 }, utcMax); in FromAndToDateTime()
48 …AssertRoundtrip(new Timestamp { Nanos = 1000000}, new DateTime(1970, 1, 1, 0, 0, 0, 1, DateTimeKin… in FromAndToDateTime()
49 …AssertRoundtrip(new Timestamp { Seconds = -1, Nanos = 999000000 }, new DateTime(1969, 12, 31, 23, … in FromAndToDateTime()
57 … var t1 = new Timestamp { Seconds = 1, Nanos = 1000000 + Duration.NanosecondsPerTick - 1 }; in ToDateTimeTruncation()
60 … var t2 = new Timestamp { Seconds = -1, Nanos = 1000000 + Duration.NanosecondsPerTick - 1 }; in ToDateTimeTruncation()
71 var value = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in ToDateTime_OutOfRange()
83 var value = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in ToDateTime_ValidBoundaries()
97 Timestamp t1 = new Timestamp { Seconds = 10000, Nanos = 5000 }; in Arithmetic()
98 Timestamp t2 = new Timestamp { Seconds = 8000, Nanos = 10000 }; in Arithmetic()
99 …Duration difference = new Duration { Seconds = 1999, Nanos = Duration.NanosecondsPerSecond - 5000 … in Arithmetic()
[all …]
/third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DTimestampPartial.cs66 return Duration.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos); in operator -()
82 return Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos); in operator +()
98 return Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos); in operator -()
116 if (!IsNormalized(Seconds, Nanos)) in ToDateTime()
120 return UnixEpoch.AddSeconds(Seconds).AddTicks(Nanos / Duration.NanosecondsPerTick); in ToDateTime()
155 …return new Timestamp { Seconds = secondsSinceBclEpoch - BclSecondsAtUnixEpoch, Nanos = nanoseconds… in FromDateTime()
184 return new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in Normalize()
238 : Nanos < other.Nanos ? -1 in CompareTo()
239 : Nanos > other.Nanos ? 1 in CompareTo()
341 return ToJson(Seconds, Nanos, true); in ToDiagnosticString()
DDuration.cs170 public int Nanos { property in Google.Protobuf.WellKnownTypes.Duration
191 if (Nanos != other.Nanos) return false; in Equals()
199 if (Nanos != 0) hash ^= Nanos.GetHashCode(); in GetHashCode()
220 if (Nanos != 0) { in WriteTo()
222 output.WriteInt32(Nanos); in WriteTo()
237 if (Nanos != 0) { in IBufferMessage.InternalWriteTo()
239 output.WriteInt32(Nanos); in IBufferMessage.InternalWriteTo()
253 if (Nanos != 0) { in CalculateSize()
254 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); in CalculateSize()
270 if (other.Nanos != 0) { in MergeFrom()
[all …]
DTimestamp.cs191 public int Nanos { property in Google.Protobuf.WellKnownTypes.Timestamp
212 if (Nanos != other.Nanos) return false; in Equals()
220 if (Nanos != 0) hash ^= Nanos.GetHashCode(); in GetHashCode()
241 if (Nanos != 0) { in WriteTo()
243 output.WriteInt32(Nanos); in WriteTo()
258 if (Nanos != 0) { in IBufferMessage.InternalWriteTo()
260 output.WriteInt32(Nanos); in IBufferMessage.InternalWriteTo()
274 if (Nanos != 0) { in CalculateSize()
275 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); in CalculateSize()
291 if (other.Nanos != 0) { in MergeFrom()
[all …]
DDurationPartial.cs89 if (!IsNormalized(Seconds, Nanos)) in ToTimeSpan()
93 long ticks = Seconds * TimeSpan.TicksPerSecond + Nanos / NanosecondsPerTick; in ToTimeSpan()
110 return new Duration { Seconds = seconds, Nanos = nanos }; in FromTimeSpan()
124 return Normalize(-value.Seconds, -value.Nanos); in operator -()
140 return Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos); in operator +()
156 return Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos); in operator -()
182 return new Duration { Seconds = seconds, Nanos = nanoseconds }; in Normalize()
241 return ToJson(Seconds, Nanos, true); in ToDiagnosticString()
/third_party/rust/crates/env_logger/src/fmt/humantime/
Dextern_impl.rs73 precision: TimestampPrecision::Nanos, in timestamp_nanos()
113 TimestampPrecision::Nanos => format_rfc3339_nanos, in fmt()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DJsonFormatterTest.cs438 Assert.AreEqual(WrapInQuotes(expected), new Timestamp { Nanos = nanos }.ToString()); in TimestampStandalone()
458 var timestamp = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in TimestampStandalone_NonNormalized()
495 … var json = JsonFormatter.Default.Format(new Duration { Seconds = seconds, Nanos = nanoseconds }); in DurationStandalone()
504 var duration = new Duration { Seconds = seconds, Nanos = nanoseconds }; in DurationStandalone_NonNormalized()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/XRay/
DFDRRecords.h135 uint32_t Nanos = 0; variable
146 Seconds(S), Nanos(N) {} in WallclockRecord()
149 uint32_t nanos() const { return Nanos; } in nanos()
/third_party/rust/crates/env_logger/src/fmt/
Dmod.rs66 Nanos, enumerator
293 Some(Nanos) => self.buf.timestamp_nanos(), in write_timestamp()
/third_party/rust/crates/humantime/src/
Ddate.rs64 Nanos, enumerator
240 Rfc3339Timestamp(system_time, Precision::Nanos) in format_rfc3339_nanos()
/third_party/rust/crates/serde/serde/src/de/
Dimpls.rs1978 Nanos, in deserialize() enumerator
2001 "nanos" => Ok(Field::Nanos), in deserialize()
2012 b"nanos" => Ok(Field::Nanos), in deserialize()
2079 Field::Nanos => { in deserialize()
2116 Nanos, in deserialize() enumerator
2139 "nanos_since_epoch" => Ok(Field::Nanos), in deserialize()
2150 b"nanos_since_epoch" => Ok(Field::Nanos), in deserialize()
2219 Field::Nanos => { in deserialize()
/third_party/protobuf/csharp/src/Google.Protobuf/
DJsonParser.cs860 timestamp += new Duration { Nanos = nanosToAdd, Seconds = secondsToAdd }; in MergeTimestamp()
869 … message.Descriptor.Fields[Timestamp.NanosFieldNumber].Accessor.SetValue(message, timestamp.Nanos); in MergeTimestamp()
/third_party/rust/crates/env_logger/src/
Dlib.rs643 self.format_timestamp(Some(fmt::TimestampPrecision::Nanos)) in format_timestamp_nanos()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/XRay/
DRecordInitializer.cpp46 R.Nanos = E.getU32(&OffsetPtr); in visit()