/external/protobuf/objectivec/google/protobuf/ |
Duration.pbobjc.h | 53 /// duration.nanos = end.nanos - start.nanos; 55 /// if (duration.seconds < 0 && duration.nanos > 0) { 57 /// duration.nanos -= 1000000000; 58 /// } else if (durations.seconds > 0 && duration.nanos < 0) { 60 /// duration.nanos += 1000000000; 70 /// end.nanos = start.nanos + duration.nanos; 91 @property(nonatomic, readwrite) int32_t nanos; variable [all...] |
Timestamp.pbobjc.h | 90 /// nanos = int((now - seconds) * 10**9) 91 /// timestamp = Timestamp(seconds=seconds, nanos=nanos) 100 /// second values with fractions must still have non-negative nanos values 103 @property(nonatomic, readwrite) int32_t nanos; variable
|
/external/guava/guava-testlib/src/com/google/common/testing/ |
FakeTicker.java | 43 private final AtomicLong nanos = new AtomicLong(); field in class:FakeTicker 53 nanos.addAndGet(nanoseconds); 70 return nanos.getAndAdd(autoIncrementStepNanos);
|
/external/protobuf/src/google/protobuf/stubs/ |
time_test.cc | 181 int32 nanos; local 182 ASSERT_TRUE(ParseTime("0001-01-01T00:00:00Z", &seconds, &nanos)); 183 EXPECT_EQ("0001-01-01T00:00:00Z", FormatTime(seconds, nanos)); 184 ASSERT_TRUE(ParseTime("9999-12-31T23:59:59.999999999Z", &seconds, &nanos)); 185 EXPECT_EQ("9999-12-31T23:59:59.999999999Z", FormatTime(seconds, nanos)); 188 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00-08:00", &seconds, &nanos)); 189 EXPECT_EQ("1970-01-01T08:00:00Z", FormatTime(seconds, nanos)); 190 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00+08:00", &seconds, &nanos)); 191 EXPECT_EQ("1969-12-31T16:00:00Z", FormatTime(seconds, nanos)); 194 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00.01Z", &seconds, &nanos)); [all...] |
/libcore/jsr166-tests/src/test/java/jsr166/ |
SystemTest.java | 33 * Nanos between readings of millis is no longer than millis (plus 46 long nanos = n2 - n1; local 47 assertTrue(nanos >= 0); 48 long nanosAsMillis = nanos / 1000000; 53 * Millis between readings of nanos is less than nanos, adjusting 66 long nanos = n2 - n1; local 68 assertTrue(nanos >= 0); 69 long nanosAsMillis = nanos / 1000000;
|
/external/caliper/caliper/src/main/java/com/google/caliper/worker/ |
MacrobenchmarkWorker.java | 70 long nanos = stopwatch.stop().elapsed(NANOSECONDS); local 75 .value(Value.create(nanos, "ns"))
|
RuntimeWorker.java | 75 long nanos = invokeTimeMethod(nextReps); local 78 .value(Value.create(nanos, "ns")) 83 totalNanos += nanos; 94 @VisibleForTesting static long calculateTargetReps(long reps, long nanos, long targetNanos, 96 double targetReps = (((double) reps) / nanos) * targetNanos;
|
/external/guava/guava/src/com/google/common/base/ |
Stopwatch.java | 216 long nanos = elapsedNanos(); local 218 TimeUnit unit = chooseUnit(nanos); 219 double value = (double) nanos / NANOSECONDS.convert(1, unit); 225 private static TimeUnit chooseUnit(long nanos) { 226 if (DAYS.convert(nanos, NANOSECONDS) > 0) { 229 if (HOURS.convert(nanos, NANOSECONDS) > 0) { 232 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { 235 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { 238 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { 241 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) [all...] |
Suppliers.java | 187 long nanos = expirationNanos; local 189 if (nanos == 0 || now - nanos >= 0) { 191 if (nanos == expirationNanos) { // recheck for lost race 194 nanos = now + durationNanos; 195 // In the very unlikely event that nanos is 0, set it to 1; 197 expirationNanos = (nanos == 0) ? 1 : nanos; 206 // This is a little strange if the unit the user provided was not NANOS, 209 durationNanos + ", NANOS)"; [all...] |
/external/protobuf/src/google/protobuf/ |
duration.pb.h | 106 // optional int32 nanos = 2; 109 ::google::protobuf::int32 nanos() const; 149 // optional int32 nanos = 2; 153 inline ::google::protobuf::int32 Duration::nanos() const { function in class:google::protobuf::Duration 154 // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) 160 // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos)
|
timestamp.pb.h | 116 // optional int32 nanos = 2; 119 ::google::protobuf::int32 nanos() const; 162 // optional int32 nanos = 2; 166 inline ::google::protobuf::int32 Timestamp::nanos() const { function in class:google::protobuf::Timestamp 167 // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos) 173 // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
|
duration.pb.cc | 86 "\n\005nanos\030\002 \001(\005B|\n\023com.google.protobufB\rDu" 230 // optional int32 nanos = 2; 274 // optional int32 nanos = 2; 275 if (this->nanos() != 0) { 276 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); 290 // optional int32 nanos = 2; 291 if (this->nanos() != 0) { 292 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); 310 // optional int32 nanos = 2; 311 if (this->nanos() != 0) 408 ::google::protobuf::int32 Duration::nanos() const { function in class:google::protobuf::Duration [all...] |
timestamp.pb.cc | 86 "\022\r\n\005nanos\030\002 \001(\005B\201\001\n\023com.google.protobufB" 244 // optional int32 nanos = 2; 288 // optional int32 nanos = 2; 289 if (this->nanos() != 0) { 290 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); 304 // optional int32 nanos = 2; 305 if (this->nanos() != 0) { 306 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); 324 // optional int32 nanos = 2; 325 if (this->nanos() != 0) 434 ::google::protobuf::int32 Timestamp::nanos() const { function in class:google::protobuf::Timestamp [all...] |
/prebuilts/tools/darwin-x86_64/protoc/include/google/protobuf/ |
duration.pb.h | 106 // optional int32 nanos = 2; 109 ::google::protobuf::int32 nanos() const; 149 // optional int32 nanos = 2; 153 inline ::google::protobuf::int32 Duration::nanos() const { function in class:google::protobuf::Duration 154 // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) 160 // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos)
|
timestamp.pb.h | 116 // optional int32 nanos = 2; 119 ::google::protobuf::int32 nanos() const; 162 // optional int32 nanos = 2; 166 inline ::google::protobuf::int32 Timestamp::nanos() const { function in class:google::protobuf::Timestamp 167 // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos) 173 // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
|
/external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/internal/core/utils/execution/ |
ExecutionUtils.java | 59 long nanos = millis * 1000000L; local 66 } while (System.nanoTime() - start < nanos);
|
/external/guava/guava-bootstrap/src/java/util/concurrent/ |
AbstractExecutorService.java | 39 boolean timed, long nanos) 70 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); 74 nanos -= now - lastTime; 155 long nanos = unit.toNanos(timeout); local 168 nanos -= now - lastTime; 170 if (nanos <= 0) 176 if (nanos <= 0) 179 f.get(nanos, TimeUnit.NANOSECONDS); 186 nanos -= now - lastTime;
|
/libcore/ojluni/src/main/java/java/time/ |
Clock.java | 277 * @throws ArithmeticException if the duration is too large to be represented as nanos 627 long nanos = instant.getNano(); local 628 long adjust = Math.floorMod(nanos, tickNanos);
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
AbstractExecutorService.java | 148 boolean timed, long nanos) 169 final long deadline = timed ? System.nanoTime() + nanos : 0L; 188 f = ecs.poll(nanos, NANOSECONDS); 191 nanos = deadline - System.nanoTime(); 264 final long nanos = unit.toNanos(timeout); local 265 final long deadline = System.nanoTime() + nanos; 277 if (((i == 0) ? nanos : deadline - System.nanoTime()) <= 0L)
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
FileTimeTest.java | 170 long nanos = v; local 171 ft = FileTime.from(nanos, NANOSECONDS); 172 secs = nanos / 1000_000_000; 173 nanos = nanos % 1000_000_000; 174 instant = Instant.ofEpochSecond(secs, nanos); 297 long nanos = NANOSECONDS.convert(value - unit.convert(secs, SECONDS), unit); local 298 if (nanos < 0) { // normalize nanoOfSecond to positive 300 nanos += 1000_000_000; 302 if (secs != instant.getEpochSecond() || (int)nanos != instant.getNano()) [all...] |
/external/caliper/caliper/src/main/java/com/google/caliper/util/ |
ShortDuration.java | 54 long nanos = TimeUnit.NANOSECONDS.convert(duration, unit); local 55 return new PositiveShortDuration(nanos * 1000); 294 builder.putAll(TimeUnit.NANOSECONDS, "ns", "nanos");
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
SimpleTimeLimiterTest.java | 175 long nanos = System.nanoTime() - startNanos; local 176 assertTrue(nanos >= atLeastMillis * 1000000); 177 assertTrue(nanos <= atMostMillis * 1000000);
|
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/ |
TimeUtil.java | 104 // Format the nanos part. 106 throw new IllegalArgumentException("Timestamp has invalid nanos value."); 145 // Parse seconds and nanos. 156 int nanos = nanoValue.isEmpty() ? 0 : parseNanos(nanoValue); local 174 return normalizedTimestamp(seconds, nanos); 200 int nanos = duration.getNanos(); local 201 if (seconds < 0 || nanos < 0) { 202 if (seconds > 0 || nanos > 0) { 204 "Invalid duration: seconds value and nanos value must have the same" 209 nanos = -nanos 244 int nanos = nanoValue.isEmpty() ? 0 : parseNanos(nanoValue); local 428 int nanos = (int) ((result - seconds) * 1000000000); local 471 int nanos = value.remainder( local 515 assert nanos >= 1 && nanos <= 999999999; local [all...] |
/external/protobuf/src/google/protobuf/util/internal/ |
protostream_objectwriter.cc | 93 StringPiece* nanos) { 97 *nanos = input.substr(idx + 1); 100 *nanos = StringPiece(); 107 int32* nanos) { 108 *nanos = 0; 116 // 's_nanos' contains fractional seconds -- i.e. 'nanos' is equal to 118 // conversion to 'nanos', rather than a double, so that there is no 170 *nanos = i_nanos * conversion; 871 int32 nanos; local 873 &nanos)) { 935 int32 nanos = 0; local [all...] |
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
FileTime.java | 150 long nanos = unit.convert(instant.getNano(), TimeUnit.NANOSECONDS); local 151 long r = secs + nanos; 153 if (((secs ^ r) & (nanos ^ r)) < 0) { 174 int nanos = instant.getNano(); local 183 return r + nanos / 1000_000; 233 int nanos = 0; local 252 nanos = (int)Math.floorMod(value, MILLIS_PER_SECOND) 257 nanos = (int)Math.floorMod(value, MICROS_PER_SECOND) 262 nanos = (int)Math.floorMod(value, NANOS_PER_SECOND); 271 instant = Instant.ofEpochSecond(secs, nanos); 414 int nanos = 0; local [all...] |