/external/protobuf/src/google/protobuf/util/ |
D | time_util.cc | 59 T CreateNormalized(int64 seconds, int64 nanos); 62 Timestamp CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument 64 if (nanos <= -kNanosPerSecond || nanos >= kNanosPerSecond) { in CreateNormalized() 65 seconds += nanos / kNanosPerSecond; in CreateNormalized() 66 nanos = nanos % kNanosPerSecond; in CreateNormalized() 69 if (nanos < 0) { in CreateNormalized() 71 nanos += kNanosPerSecond; in CreateNormalized() 77 result.set_nanos(static_cast<int32>(nanos)); in CreateNormalized() 82 Duration CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument 84 if (nanos <= -kNanosPerSecond || nanos >= kNanosPerSecond) { in CreateNormalized() [all …]
|
D | time_util.h | 101 static Duration NanosecondsToDuration(int64 nanos); 123 static Timestamp NanosecondsToTimestamp(int64 nanos); 183 return d1.nanos() < d2.nanos(); 197 return d1.seconds() == d2.seconds() && d1.nanos() == d2.nanos(); 206 result.set_nanos(-d.nanos()); 250 return t1.nanos() < t2.nanos(); 264 return t1.seconds() == t2.seconds() && t1.nanos() == t2.nanos();
|
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/ |
D | TimeUtil.java | 156 int nanos = nanoValue.isEmpty() ? 0 : parseNanos(nanoValue); in parseTimestamp() local 174 return normalizedTimestamp(seconds, nanos); in parseTimestamp() 200 int nanos = duration.getNanos(); in toString() local 201 if (seconds < 0 || nanos < 0) { in toString() 202 if (seconds > 0 || nanos > 0) { in toString() 209 nanos = -nanos; in toString() 212 if (nanos != 0) { in toString() 214 result.append(formatNanos(nanos)); in toString() 244 int nanos = nanoValue.isEmpty() ? 0 : parseNanos(nanoValue); in parseDuration() local 250 nanos = -nanos; in parseDuration() [all …]
|
/external/protobuf/python/google/protobuf/internal/ |
D | well_known_types.py | 106 nanos = self.nanos % _NANOS_PER_SECOND 107 total_sec = self.seconds + (self.nanos - nanos) // _NANOS_PER_SECOND 113 if (nanos % 1e9) == 0: 117 if (nanos % 1e6) == 0: 119 return result + '.%03dZ' % (nanos / 1e6) 120 if (nanos % 1e3) == 0: 122 return result + '.%06dZ' % (nanos / 1e3) 124 return result + '.%09dZ' % nanos 162 nanos = round(float('0.' + nano_value) * 1e9) 164 nanos = 0 [all …]
|
D | well_known_types_test.py | 78 message.nanos = 0 80 message.nanos = 10000000 82 message.nanos = 10000 84 message.nanos = 10 88 message.nanos = 0 92 message.nanos = 999999999 102 self.assertEqual(100000000, message.nanos) 106 self.assertEqual(0, message.nanos) 112 message.nanos = 0 114 message.nanos = 10000000 [all …]
|
/external/slf4j/slf4j-ext/src/main/java/org/slf4j/profiler/ |
D | Util.java | 59 static public double convertToMicros(long nanos) { in convertToMicros() argument 60 return (double) nanos / NANOS_IN_ONE_MICROSECOND; in convertToMicros() 63 static public double convertToMillis(long nanos) { in convertToMillis() argument 64 return (double) nanos / NANOS_IN_ONE_MILLISECOND; in convertToMillis() 67 static public double convertToSeconds(long nanos) { in convertToSeconds() argument 68 return ((double) nanos / NANOS_IN_ONE_SECOND); in convertToSeconds() 76 static String durationInDurationUnitsAsStr(long nanos, DurationUnit durationUnit) { in durationInDurationUnitsAsStr() argument 80 buf.append(nanos); in durationInDurationUnitsAsStr() 83 double micros = convertToMicros(nanos); in durationInDurationUnitsAsStr() 87 double millis = convertToMillis(nanos); in durationInDurationUnitsAsStr() [all …]
|
/external/protobuf/src/google/protobuf/stubs/ |
D | time_test.cc | 181 int32 nanos; in TEST() local 182 ASSERT_TRUE(ParseTime("0001-01-01T00:00:00Z", &seconds, &nanos)); in TEST() 183 EXPECT_EQ("0001-01-01T00:00:00Z", FormatTime(seconds, nanos)); in TEST() 184 ASSERT_TRUE(ParseTime("9999-12-31T23:59:59.999999999Z", &seconds, &nanos)); in TEST() 185 EXPECT_EQ("9999-12-31T23:59:59.999999999Z", FormatTime(seconds, nanos)); in TEST() 188 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00-08:00", &seconds, &nanos)); in TEST() 189 EXPECT_EQ("1970-01-01T08:00:00Z", FormatTime(seconds, nanos)); in TEST() 190 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00+08:00", &seconds, &nanos)); in TEST() 191 EXPECT_EQ("1969-12-31T16:00:00Z", FormatTime(seconds, nanos)); in TEST() 194 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00.01Z", &seconds, &nanos)); in TEST() [all …]
|
D | time.cc | 133 string FormatNanos(int32 nanos) { in FormatNanos() argument 134 if (nanos % kNanosPerMillisecond == 0) { in FormatNanos() 135 return StringPrintf("%03d", nanos / kNanosPerMillisecond); in FormatNanos() 136 } else if (nanos % kNanosPerMicrosecond == 0) { in FormatNanos() 137 return StringPrintf("%06d", nanos / kNanosPerMicrosecond); in FormatNanos() 139 return StringPrintf("%09d", nanos); in FormatNanos() 170 const char* ParseNanos(const char* data, int32* nanos) { in ParseNanos() argument 189 *nanos = value; in ParseNanos() 264 void GetCurrentTime(int64* seconds, int32* nanos) { in GetCurrentTime() argument 268 *nanos = 0; in GetCurrentTime() [all …]
|
D | time.h | 57 void LIBPROTOBUF_EXPORT GetCurrentTime(int64* seconds, int32* nanos); 66 string LIBPROTOBUF_EXPORT FormatTime(int64 seconds, int32 nanos); 69 bool LIBPROTOBUF_EXPORT ParseTime(const string& vaule, int64* seconds, int32* nanos);
|
/external/protobuf/objectivec/ |
D | GPBWellKnownTypes.m | 40 int32_t nanos) { 41 return seconds + (NSTimeInterval)nanos / 1e9; 47 NSTimeInterval nanos = modf(time, &seconds); 48 nanos *= 1e9; 50 return (int32_t)nanos; 62 int32_t nanos = SecondsAndNanosFromTimeIntervalSince1970( 65 self.nanos = nanos; 79 return TimeIntervalSince1970FromSecondsAndNanos(self.seconds, self.nanos); 84 int32_t nanos = 87 self.nanos = nanos; [all …]
|
/external/protobuf/src/google/protobuf/ |
D | duration.proto | 57 // duration.nanos = end.nanos - start.nanos; 59 // if (duration.seconds < 0 && duration.nanos > 0) { 61 // duration.nanos -= 1000000000; 62 // } else if (durations.seconds > 0 && duration.nanos < 0) { 64 // duration.nanos += 1000000000; 74 // end.nanos = start.nanos + duration.nanos; 76 // if (end.nanos < 0) { 78 // end.nanos += 1000000000; 79 // } else if (end.nanos >= 1000000000) { 81 // end.nanos -= 1000000000; [all …]
|
D | duration.pb.cc | 275 if (this->nanos() != 0) { in SerializeWithCachedSizes() 276 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); in SerializeWithCachedSizes() 291 if (this->nanos() != 0) { in SerializeWithCachedSizesToArray() 292 …target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); in SerializeWithCachedSizesToArray() 311 if (this->nanos() != 0) { in ByteSize() 314 this->nanos()); in ByteSize() 344 if (from.nanos() != 0) { in MergeFrom() 345 set_nanos(from.nanos()); in MergeFrom() 408 ::google::protobuf::int32 Duration::nanos() const { in nanos() function in google::protobuf::Duration
|
D | timestamp.pb.cc | 289 if (this->nanos() != 0) { in SerializeWithCachedSizes() 290 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); in SerializeWithCachedSizes() 305 if (this->nanos() != 0) { in SerializeWithCachedSizesToArray() 306 …target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); in SerializeWithCachedSizesToArray() 325 if (this->nanos() != 0) { in ByteSize() 328 this->nanos()); in ByteSize() 358 if (from.nanos() != 0) { in MergeFrom() 359 set_nanos(from.nanos()); in MergeFrom() 434 ::google::protobuf::int32 Timestamp::nanos() const { in nanos() function in google::protobuf::Timestamp
|
/external/guava/guava/src/com/google/common/base/ |
D | Stopwatch.java | 216 long nanos = elapsedNanos(); in toString() local 218 TimeUnit unit = chooseUnit(nanos); in toString() 219 double value = (double) nanos / NANOSECONDS.convert(1, unit); in toString() 225 private static TimeUnit chooseUnit(long nanos) { in chooseUnit() argument 226 if (DAYS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 229 if (HOURS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 232 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 235 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 238 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 241 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit()
|
D | Suppliers.java | 187 long nanos = expirationNanos; in get() local 189 if (nanos == 0 || now - nanos >= 0) { in get() 191 if (nanos == expirationNanos) { // recheck for lost race in get() 194 nanos = now + durationNanos; in get() 197 expirationNanos = (nanos == 0) ? 1 : nanos; in get()
|
/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/ |
D | DurationPartial.cs | 109 int nanos = (int) (ticks % TimeSpan.TicksPerSecond) * NanosecondsPerTick; in FromTimeSpan() 110 return new Duration { Seconds = seconds, Nanos = nanos }; in FromTimeSpan() 249 internal static void AppendNanoseconds(StringBuilder builder, int nanos) in AppendNanoseconds() argument 251 if (nanos != 0) in AppendNanoseconds() 255 if (nanos % 1000000 == 0) in AppendNanoseconds() 257 builder.Append((nanos / 1000000).ToString("d3", CultureInfo.InvariantCulture)); in AppendNanoseconds() 259 else if (nanos % 1000 == 0) in AppendNanoseconds() 261 builder.Append((nanos / 1000).ToString("d6", CultureInfo.InvariantCulture)); in AppendNanoseconds() 265 builder.Append(nanos.ToString("d9", CultureInfo.InvariantCulture)); in AppendNanoseconds()
|
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
D | Stopwatch.java | 210 private static TimeUnit chooseUnit(long nanos) { in chooseUnit() argument 211 if (DAYS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 214 if (HOURS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 217 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 220 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 223 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 226 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit()
|
/external/guava/guava-bootstrap/src/java/util/concurrent/ |
D | AbstractExecutorService.java | 39 boolean timed, long nanos) in doInvokeAny() argument 70 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); in doInvokeAny() 74 nanos -= now - lastTime; in doInvokeAny() 155 long nanos = unit.toNanos(timeout); in invokeAll() local 168 nanos -= now - lastTime; in invokeAll() 170 if (nanos <= 0) in invokeAll() 176 if (nanos <= 0) in invokeAll() 179 f.get(nanos, TimeUnit.NANOSECONDS); in invokeAll() 186 nanos -= now - lastTime; in invokeAll()
|
/external/junit/src/main/java/org/junit/rules/ |
D | Stopwatch.java | 105 protected void succeeded(long nanos, Description description) { in succeeded() argument 111 protected void failed(long nanos, Throwable e, Description description) { in failed() argument 117 protected void skipped(long nanos, AssumptionViolatedException e, Description description) { in skipped() argument 123 protected void finished(long nanos, Description description) { in finished() argument
|
/external/llvm/include/llvm/Support/ |
D | TimeValue.h | 100 explicit TimeValue (SecondsType seconds, NanoSecondsType nanos = 0) 101 : seconds_( seconds ), nanos_( nanos ) { this->normalize(); } in seconds_() 267 void getTimespecTime( uint64_t& seconds, uint32_t& nanos ) const { in getTimespecTime() argument 269 nanos = nanos_; in getTimespecTime() 296 void nanoseconds ( NanoSecondsType nanos ) { in nanoseconds() argument 297 this->nanos_ = nanos; in nanoseconds()
|
/external/swiftshader/third_party/LLVM/include/llvm/Support/ |
D | TimeValue.h | 88 explicit TimeValue (SecondsType seconds, NanoSecondsType nanos = 0) 89 : seconds_( seconds ), nanos_( nanos ) { this->normalize(); } in seconds_() 266 void getTimespecTime( uint64_t& seconds, uint32_t& nanos ) const { in getTimespecTime() argument 268 nanos = nanos_; in getTimespecTime() 295 void nanoseconds ( NanoSecondsType nanos ) { in nanoseconds() argument 296 this->nanos_ = nanos; in nanoseconds()
|
/external/protobuf/src/google/protobuf/util/internal/ |
D | protostream_objectwriter.cc | 93 StringPiece* nanos) { in SplitSecondsAndNanos() argument 97 *nanos = input.substr(idx + 1); in SplitSecondsAndNanos() 100 *nanos = StringPiece(); in SplitSecondsAndNanos() 107 int32* nanos) { in GetNanosFromStringPiece() argument 108 *nanos = 0; in GetNanosFromStringPiece() 170 *nanos = i_nanos * conversion; in GetNanosFromStringPiece() 871 int32 nanos; in RenderTimestamp() local 873 &nanos)) { in RenderTimestamp() 879 ow->ProtoWriter::RenderDataPiece("nanos", DataPiece(nanos)); in RenderTimestamp() 935 int32 nanos = 0; in RenderDuration() local [all …]
|
D | protostream_objectsource.cc | 88 const string FormatNanos(uint32 nanos); 315 int32 nanos = p.second; in RenderTimestamp() local 322 if (nanos < 0 || nanos >= kNanosPerSecond) { in RenderTimestamp() 329 ::google::protobuf::internal::FormatTime(seconds, nanos)); in RenderTimestamp() 339 int32 nanos = p.second; in RenderDuration() local 346 if (nanos <= -kNanosPerSecond || nanos >= kNanosPerSecond) { in RenderDuration() 354 if (nanos > 0) { in RenderDuration() 362 nanos = -nanos; in RenderDuration() 363 } else if (seconds == 0 && nanos < 0) { in RenderDuration() 365 nanos = -nanos; in RenderDuration() [all …]
|
/external/caliper/caliper/src/main/java/com/google/caliper/worker/ |
D | RuntimeWorker.java | 75 long nanos = invokeTimeMethod(nextReps); in measure() local 78 .value(Value.create(nanos, "ns")) in measure() 83 totalNanos += nanos; in measure() 94 @VisibleForTesting static long calculateTargetReps(long reps, long nanos, long targetNanos, in calculateTargetReps() argument 96 double targetReps = (((double) reps) / nanos) * targetNanos; in calculateTargetReps()
|
/external/guava/guava-testlib/src/com/google/common/testing/ |
D | FakeTicker.java | 43 private final AtomicLong nanos = new AtomicLong(); field in FakeTicker 53 nanos.addAndGet(nanoseconds); in advance() 70 return nanos.getAndAdd(autoIncrementStepNanos); in read()
|