Home
last modified time | relevance | path

Searched refs:toMillis (Results 1 – 25 of 74) sorted by relevance

123

/external/opencensus-java/api/src/test/java/io/opencensus/common/
DDurationTest.java143 public void toMillis() { in toMillis() method in DurationTest
144 assertThat(Duration.create(10, 0).toMillis()).isEqualTo(10000L); in toMillis()
145 assertThat(Duration.create(10, 1000).toMillis()).isEqualTo(10000L); in toMillis()
146 assertThat(Duration.create(0, (int) 1e6).toMillis()).isEqualTo(1L); in toMillis()
147 assertThat(Duration.create(0, 0).toMillis()).isEqualTo(0L); in toMillis()
148 assertThat(Duration.create(-10, 0).toMillis()).isEqualTo(-10000L); in toMillis()
149 assertThat(Duration.create(-10, -1000).toMillis()).isEqualTo(-10000L); in toMillis()
150 assertThat(Duration.create(0, -(int) 1e6).toMillis()).isEqualTo(-1L); in toMillis()
/external/guava/guava-gwt/src-super/java/util/super/java/util/concurrent/
DTimeUnit.java21 public long toMillis(long d) { return d/(C2/C0); } in toMillis() method
32 public long toMillis(long d) { return d/(C2/C1); } in toMillis() method
43 public long toMillis(long d) { return d; } in toMillis() method
48 public long convert(long d, TimeUnit u) { return u.toMillis(d); } in convert()
54 public long toMillis(long d) { return x(d, C3/C2, MAX/(C3/C2)); } in toMillis() method
65 public long toMillis(long d) { return x(d, C4/C2, MAX/(C4/C2)); } in toMillis() method
76 public long toMillis(long d) { return x(d, C5/C2, MAX/(C5/C2)); } in toMillis() method
87 public long toMillis(long d) { return x(d, C6/C2, MAX/(C6/C2)); } in toMillis() method
127 public long toMillis(long duration) { in toMillis() method in TimeUnit
/external/opencensus-java/exporters/trace/instana/src/main/java/io/opencensus/exporter/trace/instana/
DInstanaExporterHandler.java105 private static long toMillis(Timestamp timestamp) { in toMillis() method in InstanaExporterHandler
106 return SECONDS.toMillis(timestamp.getSeconds()) + NANOSECONDS.toMillis(timestamp.getNanos()); in toMillis()
109 private static long toMillis(Timestamp start, Timestamp end) { in toMillis() method in InstanaExporterHandler
111 return SECONDS.toMillis(duration.getSeconds()) + NANOSECONDS.toMillis(duration.getNanos()); in toMillis()
150 sb.append("\"timestamp\":").append(toMillis(startTimestamp)).append(','); in convertToJson()
151 sb.append("\"duration\":").append(toMillis(startTimestamp, endTimestamp)).append(','); in convertToJson()
/external/opencensus-java/api/src/main/java/io/opencensus/common/
DDuration.java98 public long toMillis() { in toMillis() method in Duration
99 return TimeUnit.SECONDS.toMillis(getSeconds()) + TimeUnit.NANOSECONDS.toMillis(getNanos()); in toMillis()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DRecordingCallback.java28 public static final long TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(10);
48 long timeoutMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TIMEOUT_MILLIS; in await()
58 long nowMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); in await()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowTime.java73 long millis = time.toMillis(true); in isEpoch()
122 protected long toMillis(boolean ignoreDst) { in toMillis() method in ShadowTime
172 long date = toMillis(true); in switchTimezone()
181 long ams = a.toMillis(false); in compare()
182 long bms = b.toMillis(false); in compare()
291 long millisInUtc = time.toMillis(false); in parse3339()
316 …return Strftime.format(format, new Date(toMillis(false)), Locale.getDefault(), TimeZone.getTimeZon… in format()
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/http/
DCacheStrategy.java204 freshMillis = Math.min(freshMillis, SECONDS.toMillis(requestCaching.maxAgeSeconds())); in getCandidate()
209 minFreshMillis = SECONDS.toMillis(requestCaching.minFreshSeconds()); in getCandidate()
215 maxStaleMillis = SECONDS.toMillis(requestCaching.maxStaleSeconds()); in getCandidate()
253 return SECONDS.toMillis(responseCaching.maxAgeSeconds()); in computeFreshnessLifetime()
284 ? Math.max(apparentReceivedAge, SECONDS.toMillis(ageSeconds)) in cacheResponseAge()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/
DCacheStrategy.java199 freshMillis = Math.min(freshMillis, SECONDS.toMillis(requestCaching.maxAgeSeconds())); in getCandidate()
204 minFreshMillis = SECONDS.toMillis(requestCaching.minFreshSeconds()); in getCandidate()
210 maxStaleMillis = SECONDS.toMillis(requestCaching.maxStaleSeconds()); in getCandidate()
248 return SECONDS.toMillis(responseCaching.maxAgeSeconds()); in computeFreshnessLifetime()
279 ? Math.max(apparentReceivedAge, SECONDS.toMillis(ageSeconds)) in cacheResponseAge()
/external/mockito/src/test/java/org/mockitoutil/
DStopwatch.java68 …new MockitoAssertionError(format(message, NANOSECONDS.toMillis(expectedNanos), NANOSECONDS.toMilli… in fail()
/external/opencensus-java/impl_core/src/main/java/io/opencensus/implcore/stats/
DIntervalBucket.java89 return ((double) elapsedTime.toMillis()) / duration.toMillis(); in getFraction()
/external/okhttp/okio/okio/src/test/java/okio/
DSocketTimeoutTest.java83 assertTrue("elapsed: " + elapsed, TimeUnit.NANOSECONDS.toMillis(elapsed) >= 500); in writeWithTimeout()
84 assertTrue("elapsed: " + elapsed, TimeUnit.NANOSECONDS.toMillis(elapsed) <= 750); in writeWithTimeout()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DAbstractManagedChannelImplBuilder.java75 static final long IDLE_MODE_DEFAULT_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(30);
81 static final long IDLE_MODE_MIN_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(1);
293 this.idleTimeoutMillis = Math.max(unit.toMillis(value), IDLE_MODE_MIN_TIMEOUT_MILLIS); in idleTimeout()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DWrappingExecutorServiceTest.java203 assertEquals(unit.toMillis(timeout), lastTimeoutInMillis); in assertMethodWithTimeout()
226 lastTimeoutInMillis = unit.toMillis(timeout); in invokeAll()
244 lastTimeoutInMillis = unit.toMillis(timeout); in invokeAny()
/external/robolectric-shadows/utils/src/main/java/org/robolectric/util/
DScheduler.java158 long delayMillis = unit.toMillis(delay); in postDelayed()
242 long endingTime = currentTime + unit.toMillis(amount); in advanceBy()
DSimpleFuture.java50 while (!hasRun) this.wait(unit.toMillis(timeout)); in get()
/external/protobuf/java/util/src/test/java/com/google/protobuf/util/
DTimeUtilTest.java374 assertEquals(1111, TimeUtil.toMillis(timestamp)); in testTimestampConversion()
385 assertEquals(-889, TimeUtil.toMillis(timestamp)); in testTimestampConversion()
398 assertEquals(1111, TimeUtil.toMillis(duration)); in testDurationConversion()
409 assertEquals(-1111, TimeUtil.toMillis(duration)); in testDurationConversion()
/external/turbine/javatests/com/google/turbine/lower/testdata/
Dcast_tail.test5 public static final int X = (int) (TimeUnit.SECONDS.toMillis(0));
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowTimeTest.java40 assertThat(t.toMillis(false)).isEqualTo(1000); in shouldSetToNow()
127 assertEquals(86400 * 1000, t.toMillis(false)); in shouldHaveToMillis()
148 assertThat(t.toMillis(true)).isEqualTo(1414213562000L); in shouldSwitchTimeZones()
435 millis = time.toMillis(false); in testSetJulianDay()
/external/conscrypt/libcore-stub/src/main/java/android/system/
DStructTimeval.java43 public long toMillis() { in toMillis() method in StructTimeval
/external/apache-http/src/org/apache/http/impl/conn/
DSingleClientConnManager.java334 connectionExpiresTime = timeUnit.toMillis(validDuration) + lastReleaseTime;
358 System.currentTimeMillis() - tunit.toMillis(idletime);
/external/caliper/caliper/src/test/java/com/google/caliper/runner/
DWorkerProcessTest.java119 FakeWorkers.Sleeper.class, Long.toString(MINUTES.toMillis(1))).startWorker(); in shutdownHook_exitValueThrows()
148 FakeWorkers.Sleeper.class, Long.toString(MINUTES.toMillis(1))).startWorker(); in shutdownHook_destroy()
/external/setupcompat/main/java/com/google/android/setupcompat/internal/
DClockProvider.java30 return TimeUnit.NANOSECONDS.toMillis(timeInNanos()); in timeInMillis()
/external/okhttp/mockwebserver/src/test/java/com/squareup/okhttp/mockwebserver/
DMockWebServerTest.java209 long elapsedMillis = NANOSECONDS.toMillis(elapsedNanos); in throttleRequest()
235 long elapsedMillis = NANOSECONDS.toMillis(elapsedNanos);
252 long elapsedMillis = NANOSECONDS.toMillis(elapsedNanos);
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/
DOkHttpClient.java189 long millis = unit.toMillis(timeout); in setConnectTimeout()
209 long millis = unit.toMillis(timeout); in setReadTimeout()
227 long millis = unit.toMillis(timeout); in setWriteTimeout()
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/
DOkHttpClient.java195 long millis = unit.toMillis(timeout); in setConnectTimeout()
215 long millis = unit.toMillis(timeout); in setReadTimeout()
233 long millis = unit.toMillis(timeout); in setWriteTimeout()

123