Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 65 for advance (0.27 sec)

  1. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

      private volatile long autoIncrementStepNanos;
    
      /** Advances the ticker value by {@code time} in {@code timeUnit}. */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      @CanIgnoreReturnValue
      public FakeTicker advance(long time, TimeUnit timeUnit) {
        return advance(timeUnit.toNanos(time));
      }
    
      /** Advances the ticker value by {@code nanoseconds}. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

      public void testAdvance() {
        FakeTicker ticker = new FakeTicker();
        assertEquals(0, ticker.read());
        assertSame(ticker, ticker.advance(10));
        assertEquals(10, ticker.read());
        ticker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(1000010L, ticker.read());
        ticker.advance(Duration.ofMillis(1));
        assertEquals(2000010L, ticker.read());
      }
    
      public void testAutoIncrementStep_returnsSameInstance() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/base/StopwatchTest.java

      public void testElapsed_notRunning() {
        ticker.advance(1);
        stopwatch.start();
        ticker.advance(4);
        stopwatch.stop();
        ticker.advance(9);
        assertEquals(4, stopwatch.elapsed(NANOSECONDS));
      }
    
      public void testElapsed_multipleSegments() {
        stopwatch.start();
        ticker.advance(9);
        stopwatch.stop();
    
        ticker.advance(16);
    
        stopwatch.start();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  4. maven-api-impl/src/main/java/org/apache/maven/internal/impl/PropertiesAsMap.java

                    return new Iterator<Entry<String, String>>() {
                        Entry<String, String> next;
    
                        {
                            advance();
                        }
    
                        private void advance() {
                            next = null;
                            while (iterator.hasNext()) {
                                Entry<Object, Object> e = iterator.next();
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        // 4 expires
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(6, 8, 0, 1, 2, 5, 7, 9);
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(6, 8, 0, 1, 2, 5, 7, 9);
    
        // 6 expires
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(8, 0, 1, 2, 5, 7, 9);
        ticker.advance(1, MILLISECONDS);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/StopwatchTest.java

      public void testElapsed_notRunning() {
        ticker.advance(1);
        stopwatch.start();
        ticker.advance(4);
        stopwatch.stop();
        ticker.advance(9);
        assertEquals(4, stopwatch.elapsed(NANOSECONDS));
      }
    
      public void testElapsed_multipleSegments() {
        stopwatch.start();
        ticker.advance(9);
        stopwatch.stop();
    
        ticker.advance(16);
    
        stopwatch.start();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        // 4 expires
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(6, 8, 0, 1, 2, 5, 7, 9);
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(6, 8, 0, 1, 2, 5, 7, 9);
    
        // 6 expires
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(8, 0, 1, 2, 5, 7, 9);
        ticker.advance(1, MILLISECONDS);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/FakeTicker.java

      private volatile long autoIncrementStepNanos;
    
      /** Advances the ticker value by {@code time} in {@code timeUnit}. */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      @CanIgnoreReturnValue
      public FakeTicker advance(long time, TimeUnit timeUnit) {
        return advance(timeUnit.toNanos(time));
      }
    
      /** Advances the ticker value by {@code nanoseconds}. */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/MultiReader.java

      @CheckForNull private Reader current;
    
      MultiReader(Iterator<? extends CharSource> readers) throws IOException {
        this.it = readers;
        advance();
      }
    
      /** Closes the current reader and opens the next one, if any. */
      private void advance() throws IOException {
        close();
        if (it.hasNext()) {
          current = it.next().openStream();
        }
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2.4K bytes
    - Viewed (2)
  10. maven-core/src/main/java/org/apache/maven/internal/impl/PropertiesAsMap.java

                    return new Iterator<Entry<String, String>>() {
                        Entry<String, String> next;
    
                        {
                            advance();
                        }
    
                        private void advance() {
                            next = null;
                            while (iterator.hasNext()) {
                                Entry<Object, Object> e = iterator.next();
    Java
    - Registered: Sun Mar 24 03:35:10 GMT 2024
    - Last Modified: Tue Nov 22 13:26:01 GMT 2022
    - 3.7K bytes
    - Viewed (0)
Back to top