Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for toMillis (0.29 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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  2. 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)
  3. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  4. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  5. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  7. maven-core/src/main/java/org/apache/maven/ReactorReader.java

                // Not using File#lastModified() to avoid a Linux JDK8 milliseconds precision bug: JDK-8177809.
                long artifactLastModified =
                        Files.getLastModifiedTime(packagedArtifactFile.toPath()).toMillis();
    
                if (session.getProjectBuildingRequest().getBuildStartTime() != null) {
                    long buildStartTime =
                            session.getProjectBuildingRequest().getBuildStartTime().getTime();
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 16:33:18 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        val startNanos = System.nanoTime()
        while (webSocket.receivedPongCount() < 3) {
          Thread.sleep(50)
        }
        val elapsedUntilPong3 = System.nanoTime() - startNanos
        assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilPong3).toDouble())
          .isCloseTo(1500.0, 250.0)
    
        // The client pinged the server 3 times, and it has ponged back 3 times.
        assertThat(webSocket.sentPingCount()).isEqualTo(3)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  9. guava-tests/test/com/google/common/io/MoreFilesTest.java

        assertTrue(Files.exists(temp));
        Files.setLastModifiedTime(temp, FileTime.fromMillis(0));
        assertEquals(0, Files.getLastModifiedTime(temp).toMillis());
        MoreFiles.touch(temp);
        assertThat(Files.getLastModifiedTime(temp).toMillis()).isNotEqualTo(0);
      }
    
      public void testCreateParentDirectories_root() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 29 22:57:05 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        else -> throw AssertionError()
      }
    }
    
    internal fun checkDuration(
      name: String,
      duration: Long,
      unit: TimeUnit,
    ): Int {
      check(duration >= 0L) { "$name < 0" }
      val millis = unit.toMillis(duration)
      require(millis <= Integer.MAX_VALUE) { "$name too large" }
      require(millis != 0L || duration <= 0L) { "$name too small" }
      return millis.toInt()
    }
    
    internal fun checkDuration(
      name: String,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top