Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for toMillis (0.21 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

          assertEquals(method, lastMethodCalled);
        }
    
        public void assertMethodWithTimeout(String method, long timeout, TimeUnit unit) {
          assertLastMethodCalled(method + "Timeout");
          assertEquals(unit.toMillis(timeout), lastTimeoutInMillis);
        }
    
        @Override
        public boolean awaitTermination(long timeout, TimeUnit unit) {
          lastMethodCalled = "awaitTermination";
          return false;
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  2. build-logic/build-update-utils/src/test/groovy/gradlebuild/buildutils/tasks/UpdateReleasedVersionsTest.groovy

        }
    
        def "final releases are sorted by version"() {
            def snapshot = snapshot('4.3')
            def rc = releasedVersion('4.3-rc-1')
            def referenceBuildTime = System.currentTimeMillis() - DAYS.toMillis(10)
            def finalVersionsBefore = [
                releasedVersion('4.3.1', referenceBuildTime + 7),
                releasedVersion('4.4', referenceBuildTime + 5),
                releasedVersion('4.3', referenceBuildTime + 2),
    Groovy
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 5.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/RecordingCallback.kt

        val timeoutMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TIMEOUT_MILLIS
        while (true) {
          val i = responses.iterator()
          while (i.hasNext()) {
            val recordedResponse = i.next()
            if (recordedResponse.request.url.equals(url)) {
              i.remove()
              return recordedResponse
            }
          }
          val nowMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime())
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

          if (requestCaching.maxAgeSeconds != -1) {
            freshMillis = minOf(freshMillis, SECONDS.toMillis(requestCaching.maxAgeSeconds.toLong()))
          }
    
          var minFreshMillis: Long = 0
          if (requestCaching.minFreshSeconds != -1) {
            minFreshMillis = SECONDS.toMillis(requestCaching.minFreshSeconds.toLong())
          }
    
          var maxStaleMillis: Long = 0
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

          assertEquals(method, lastMethodCalled);
        }
    
        public void assertMethodWithTimeout(String method, long timeout, TimeUnit unit) {
          assertLastMethodCalled(method + "Timeout");
          assertEquals(unit.toMillis(timeout), lastTimeoutInMillis);
        }
    
        @Override
        public boolean awaitTermination(long timeout, TimeUnit unit) {
          lastMethodCalled = "awaitTermination";
          return false;
        }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  6. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo(-1)
        val elapsedNanos = System.nanoTime() - startNanos
        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
        assertThat(elapsedMillis).isBetween(500L, 1000L)
      }
    
      /**
       * Throttle the response body by sleeping 500ms after every 3 bytes. With a 6-byte response, this
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

        // We need to wait for the runner to exit.  It used to be that the runner would get stuck in the
        // busy loop when interrupt threw.
        runner.join(TimeUnit.SECONDS.toMillis(10));
      }
    
      static final class BrokenChannel extends AbstractInterruptibleChannel {
        @Override
        protected void implCloseChannel() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

        // We need to wait for the runner to exit.  It used to be that the runner would get stuck in the
        // busy loop when interrupt threw.
        runner.join(TimeUnit.SECONDS.toMillis(10));
      }
    
      static final class BrokenChannel extends AbstractInterruptibleChannel {
        @Override
        protected void implCloseChannel() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  9. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          try {
            response = chain.proceed(request)
          } catch (e: Exception) {
            logger.log("<-- HTTP FAILED: $e")
            throw e
          }
    
          val tookMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs)
    
          val responseBody = response.body!!
          val contentLength = responseBody.contentLength()
          val bodySize = if (contentLength != -1L) "$contentLength-byte" else "unknown-length"
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  10. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

      fun exhaustResponse() =
        apply {
          actions += { stream -> stream.responseBody.close() }
        }
    
      fun sleep(
        duration: Long,
        unit: TimeUnit,
      ) = apply {
        actions += { Thread.sleep(unit.toMillis(duration)) }
      }
    
      override fun handle(stream: Stream) {
        val task = serviceStreamTask(stream)
        results.add(task)
        task.run()
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
Back to top