- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for Stopwatch (0.13 sec)
-
guava/src/com/google/common/base/Stopwatch.java
* reasonably accurate values are sufficient. If the uncommon case that you need to maximize * accuracy, use {@code System.nanoTime()} directly instead. * * <p>Basic usage: * * <pre>{@code * Stopwatch stopwatch = Stopwatch.createStarted(); * doSomething(); * stopwatch.stop(); // optional * * Duration duration = stopwatch.elapsed(); *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 9.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
Stopwatch stopwatch = Stopwatch.createStarted(); assertThrows(UncheckedTimeoutException.class, () -> proxy.sleepThenThrowException()); assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(NOT_ENOUGH_MS, DELAY_MS * 2)); } public void testCallWithTimeout_goodCallableWithEnoughTime() throws Exception { Stopwatch stopwatch = Stopwatch.createStarted();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 9.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/StopwatchTest.java
ticker.advance(8998); assertEquals("9.999 \u03bcs", stopwatch.toString()); stopwatch.reset(); stopwatch.start(); ticker.advance(1234567); assertEquals("1.235 ms", stopwatch.toString()); stopwatch.reset(); stopwatch.start(); ticker.advance(5000000000L); assertEquals("5.000 s", stopwatch.toString()); stopwatch.reset(); stopwatch.start();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.7K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java
* because it's ambiguous to what extent the stopwatch benchmark is being affected by GC. * * @author Kevin Bourrillion */ public class StopwatchBenchmark { @Benchmark long stopwatch(int reps) { long total = 0; for (int i = 0; i < reps; i++) { Stopwatch s = Stopwatch.createStarted(); // here is where you would do something total += s.elapsed(NANOSECONDS);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/StopwatchTest.java
ticker.advance(8998); assertEquals("9.999 \u03bcs", stopwatch.toString()); stopwatch.reset(); stopwatch.start(); ticker.advance(1234567); assertEquals("1.235 ms", stopwatch.toString()); stopwatch.reset(); stopwatch.start(); ticker.advance(5000000000L); assertEquals("5.000 s", stopwatch.toString()); stopwatch.reset(); stopwatch.start();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/StopwatchJavaTimeTest.java
import junit.framework.TestCase; /** Unit test for the {@code java.time} support in {@link Stopwatch}. */ @J2ktIncompatible @GwtIncompatible public class StopwatchJavaTimeTest extends TestCase { private final FakeTicker ticker = new FakeTicker(); private final Stopwatch stopwatch = new Stopwatch(ticker); public void testElapsed_duration() { stopwatch.start(); ticker.advance(999999);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu May 04 09:41:29 UTC 2023 - 1.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java
* because it's ambiguous to what extent the stopwatch benchmark is being affected by GC. * * @author Kevin Bourrillion */ public class StopwatchBenchmark { @Benchmark long stopwatch(int reps) { long total = 0; for (int i = 0; i < reps; i++) { Stopwatch s = Stopwatch.createStarted(); // here is where you would do something total += s.elapsed(NANOSECONDS);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/package-info.java
* </ul> * * <h3>Other</h3> * * <ul> * <li>{@link Enums} * <li>{@link MoreObjects} * <li>{@link Preconditions} * <li>{@link StandardSystemProperty} * <li>{@link Stopwatch} * <li>{@link Throwables} * <li>{@link Verify} * </ul> * * <h3>The rest</h3> * * This package also contains some classes with niche use cases (e.g., {@link Utf8} and {@link
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jun 26 16:48:06 UTC 2023 - 1.8K bytes - Viewed (0)