- Sort Score
- Result 10 results
- Languages All
Results 31 - 38 of 38 for toMillis (0.14 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
permits -= nextPermitsToAcquire; rateLimiter.acquire(nextPermitsToAcquire); } rateLimiter.acquire(1); // to repay for any pending debt return NANOSECONDS.toMillis(stopwatch.instant - startTime); } private void assertEvents(String... events) { assertEquals(Arrays.toString(events), stopwatch.readEventsAndClear()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
permits -= nextPermitsToAcquire; rateLimiter.acquire(nextPermitsToAcquire); } rateLimiter.acquire(1); // to repay for any pending debt return NANOSECONDS.toMillis(stopwatch.instant - startTime); } private void assertEvents(String... events) { assertEquals(Arrays.toString(events), stopwatch.readEventsAndClear()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
thread.awaitWaiting(); Thread.class.getMethod("suspend").invoke(thread); // Sleep for enough time to add 1500 milliseconds of overwait to the get() call. long toWaitMillis = 3500 - NANOSECONDS.toMillis(System.nanoTime() - thread.startTime); Thread.sleep(toWaitMillis); thread.setPriority(Thread.MAX_PRIORITY); Thread.class.getMethod("resume").invoke(thread); thread.join();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 47.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
fun retainServedDateFormat() { // Serve a response with a non-standard date format that OkHttp supports. val lastModifiedDate = Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1)) val servedDate = Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-2)) val dateFormat: DateFormat = SimpleDateFormat("EEE dd-MMM-yyyy HH:mm:ss z", Locale.US) dateFormat.timeZone = TimeZone.getTimeZone("America/New_York")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
* previously returned from a call to {@link System#nanoTime()}. */ long millisElapsedSince(long startNanoTime) { return NANOSECONDS.toMillis(System.nanoTime() - startNanoTime); } /** Returns a new started daemon Thread running the given runnable. */ Thread newStartedThread(Runnable runnable) { Thread t = new Thread(runnable);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 37.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
* previously returned from a call to {@link System#nanoTime()}. */ long millisElapsedSince(long startNanoTime) { return NANOSECONDS.toMillis(System.nanoTime() - startNanoTime); } /** Returns a new started daemon Thread running the given runnable. */ Thread newStartedThread(Runnable runnable) { Thread t = new Thread(runnable);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 37.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
bodySource.readByte() }.also { expected -> // Timed out as expected. val elapsedNanos = System.nanoTime() - startNanos val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos) assertThat(elapsedMillis).isLessThan(500) } } } /** https://github.com/square/okhttp/issues/442 */ @Test fun tlsTimeoutsNotRetried() { enableTls()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
val inputStream = connection1.body.byteStream() inputStream.close() val elapsedNanos = System.nanoTime() - startNanos val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos) // If we're working correctly, this should be greater than 100ms, but less than double that. // Previously we had a bug where we would download the entire response body as long as no
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 131.7K bytes - Viewed (0)