Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 117 for Nanoseconds (0.35 sec)

  1. android/guava/src/com/google/common/base/Stopwatch.java

          return MINUTES;
        }
        if (SECONDS.convert(nanos, NANOSECONDS) > 0) {
          return SECONDS;
        }
        if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MILLISECONDS;
        }
        if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MICROSECONDS;
        }
        return NANOSECONDS;
      }
    
      private static String abbreviate(TimeUnit unit) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Nov 15 21:38:09 GMT 2022
    - 8.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/base/StopwatchTest.java

        assertEquals(0, stopwatch.elapsed(NANOSECONDS));
        stopwatch.start();
        ticker.advance(3);
        assertEquals(3, stopwatch.elapsed(NANOSECONDS));
      }
    
      public void testReset_whileRunning() {
        ticker.advance(1);
        stopwatch.start();
        assertEquals(0, stopwatch.elapsed(NANOSECONDS));
        ticker.advance(2);
        assertEquals(2, stopwatch.elapsed(NANOSECONDS));
        stopwatch.reset();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

            hook.start();
          }
          for (Thread hook : hooks) {
            hook.join();
          }
        }
      }
    
      /* Half of a 1-second timeout in nanoseconds */
      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

            hook.start();
          }
          for (Thread hook : hooks) {
            hook.join();
          }
        }
      }
    
      /* Half of a 1-second timeout in nanoseconds */
      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (3)
  5. logger/logger.go

    			l.Printf(l.traceWarnStr, utils.FileWithLineNum(), slowLog, float64(elapsed.Nanoseconds())/1e6, "-", sql)
    		} else {
    			l.Printf(l.traceWarnStr, utils.FileWithLineNum(), slowLog, float64(elapsed.Nanoseconds())/1e6, rows, sql)
    		}
    	case l.LogLevel == Info:
    		sql, rows := fc()
    		if rows == -1 {
    			l.Printf(l.traceStr, utils.FileWithLineNum(), float64(elapsed.Nanoseconds())/1e6, "-", sql)
    		} else {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/ListeningExecutorServiceTest.java

        assertThat(recordedTimeUnit).isEqualTo(NANOSECONDS);
        assertThat(Duration.ofNanos(recordedTimeout)).isEqualTo(Duration.ofDays(365));
      }
    
      public void testAwaitTermination() throws Exception {
        boolean result = executorService.awaitTermination(Duration.ofMinutes(144));
    
        assertThat(result).isTrue();
        assertThat(recordedTimeUnit).isEqualTo(NANOSECONDS);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Jun 02 12:45:23 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/ListeningScheduledExecutorServiceTest.java

        assertThat(future.get()).isEqualTo("schedule");
        assertThat(recordedCommand).isSameInstanceAs(command);
        assertThat(recordedTimeUnit).isEqualTo(TimeUnit.NANOSECONDS);
        assertThat(Duration.ofNanos(recordedDelay)).isEqualTo(Duration.ofSeconds(12));
      }
    
      public void testScheduleCallable() throws Exception {
        Callable<String> callable = () -> "hello";
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Mar 17 20:45:59 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ListenableFutureTask.java

        long timeoutNanos = unit.toNanos(timeout);
        if (timeoutNanos <= OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD) {
          return super.get(timeout, unit);
        }
        // Waiting 68 years should be enough for any program.
        return super.get(
            min(timeoutNanos, OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD), NANOSECONDS);
      }
    
      /** Internal implementation detail used to invoke the listeners. */
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/QueuesTest.java

    import static java.lang.Thread.currentThread;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.base.Stopwatch;
    import java.util.Collection;
    import java.util.List;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

        return advance(timeUnit.toNanos(time));
      }
    
      /** Advances the ticker value by {@code nanoseconds}. */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      @CanIgnoreReturnValue
      public FakeTicker advance(long nanoseconds) {
        nanos.addAndGet(nanoseconds);
        return this;
      }
    
      /**
       * Advances the ticker value by {@code duration}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top