/packages/apps/DeskClock/src/com/android/deskclock/data/ |
StopwatchListener.java | 20 * The interface through which interested parties are notified of changes to the stopwatch or laps. 25 * @param before the stopwatch state before the update 26 * @param after the stopwatch state after the update 28 void stopwatchUpdated(Stopwatch before, Stopwatch after);
|
Stopwatch.java | 21 import static com.android.deskclock.data.Stopwatch.State.PAUSED; 22 import static com.android.deskclock.data.Stopwatch.State.RESET; 23 import static com.android.deskclock.data.Stopwatch.State.RUNNING; 26 * A read-only domain object representing a stopwatch. 28 public final class Stopwatch { 34 /** The single, immutable instance of a reset stopwatch. */ 35 private static final Stopwatch RESET_STOPWATCH = new Stopwatch(RESET, UNUSED, UNUSED, 0); 37 /** Current state of this stopwatch. */ 40 /** Elapsed time in ms the stopwatch was last started; {@link #UNUSED} if not running. * [all...] |
StopwatchDAO.java | 21 import com.android.deskclock.data.Stopwatch.State; 27 import static com.android.deskclock.data.Stopwatch.State.RESET; 30 * This class encapsulates the transfer of data between {@link Stopwatch} and {@link Lap} domain 35 /** Key to a preference that stores the state of the stopwatch. */ 38 /** Key to a preference that stores the last start time of the stopwatch. */ 41 /** Key to a preference that stores the epoch time when the stopwatch last started. */ 44 /** Key to a preference that stores the accumulated elapsed time of the stopwatch. */ 56 * @return the stopwatch from permanent storage or a reset stopwatch if none exists 58 static Stopwatch getStopwatch(SharedPreferences prefs) [all...] |
StopwatchModel.java | 33 * All {@link Stopwatch} data is accessed via this model. 44 /** Used to create and destroy system notifications related to the stopwatch. */ 47 /** Update stopwatch notification when locale changes. */ 51 /** The listeners to notify when the stopwatch or its laps change. */ 54 /** Delegate that builds platform-specific stopwatch notifications. */ 58 /** The current state of the stopwatch. */ 59 private Stopwatch mStopwatch; 61 /** A mutable copy of the recorded stopwatch laps. */ 70 // Update stopwatch notification when locale changes. 76 * @param stopwatchListener to be notified when stopwatch changes or laps are adde 198 final Stopwatch stopwatch = getStopwatch(); local 224 final Stopwatch stopwatch = getStopwatch(); local [all...] |
/external/libmojo/mojo/edk/system/ |
test_utils.h | 36 // Stopwatch ------------------------------------------------------------------- 38 // A simple "stopwatch" for measuring time elapsed from a given starting point. 39 class Stopwatch { 41 Stopwatch(); 42 ~Stopwatch(); 52 DISALLOW_COPY_AND_ASSIGN(Stopwatch);
|
test_utils.cc | 57 Stopwatch::Stopwatch() { 60 Stopwatch::~Stopwatch() { 63 void Stopwatch::Start() { 67 MojoDeadline Stopwatch::Elapsed() {
|
/external/junit/src/main/java/org/junit/rules/ |
Stopwatch.java | 10 * The Stopwatch Rule notifies one of its own protected methods of the time spent by a test. 26 * public Stopwatch stopwatch = new Stopwatch() { 70 * assertEquals(300d, stopwatch.runtime(MILLISECONDS), delta); 72 * assertEquals(800d, stopwatch.runtime(MILLISECONDS), delta); 79 public abstract class Stopwatch implements TestRule { 84 public Stopwatch() { 88 Stopwatch(Clock clock) { 154 Stopwatch.this.starting() [all...] |
/external/guava/guava/src/com/google/common/base/ |
Stopwatch.java | 45 * returned by {@code nanoTime} at a different time. {@code Stopwatch} is a 52 * Stopwatch stopwatch = Stopwatch.{@link #createStarted createStarted}(); 54 * stopwatch.{@link #stop stop}(); // optional 56 * long millis = stopwatch.elapsed(MILLISECONDS); 58 * log.info("time: " + stopwatch); // formatted string like "12.3 ms"</pre> 60 * <p>Stopwatch methods are not idempotent; it is an error to start or stop a 61 * stopwatch that is already in the desired state. 67 * simulate any valid behavior of the stopwatch [all...] |
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
Stopwatch.java | 44 * returned by {@code nanoTime} at a different time. {@code Stopwatch} is a 51 * Stopwatch stopwatch = Stopwatch.{@link #createStarted createStarted}(); 53 * stopwatch.{@link #stop stop}(); // optional 55 * long millis = stopwatch.elapsed(MILLISECONDS); 57 * log.info("time: " + stopwatch); // formatted string like "12.3 ms"</pre> 59 * <p>Stopwatch methods are not idempotent; it is an error to start or stop a 60 * stopwatch that is already in the desired state. 66 * simulate any valid behavior of the stopwatch [all...] |
/external/guava/guava-tests/benchmark/com/google/common/base/ |
StopwatchBenchmark.java | 20 import com.google.common.base.Stopwatch; 26 * most useful result because it's ambiguous to what extent the stopwatch 32 @Benchmark long stopwatch(int reps) { method in class:StopwatchBenchmark 35 Stopwatch s = Stopwatch.createStarted();
|
/system/netd/include/ |
Stopwatch.h | 22 class Stopwatch { 24 Stopwatch() : mStart(clock::now()) {} 26 virtual ~Stopwatch() {};
|
/development/tools/idegen/src/ |
Stopwatch.java | 20 class Stopwatch {
|
/external/guice/core/src/com/google/inject/internal/util/ |
Stopwatch.java | 26 public final class Stopwatch { 27 private static final Logger logger = Logger.getLogger(Stopwatch.class.getName());
|
/frameworks/base/services/net/java/android/net/util/ |
Stopwatch.java | 25 public class Stopwatch { 43 // Stopwatch s = new Stopwatch().start(); 44 public Stopwatch start() { 61 // If the Stopwatch is not running, returns the same value as stop(),
|
/external/mockito/src/test/java/org/mockitoutil/ |
Stopwatch.java | 11 * This class can be uses as stopwatch to assert that a given time is elapsed or not. 13 public class Stopwatch { 23 private Stopwatch() { 27 * Return a new and not started {@link Stopwatch}. 29 public static Stopwatch createNotStarted() { 30 return new Stopwatch();
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
GifTranscoder.java | 22 import com.google.common.base.Stopwatch; 48 Stopwatch stopwatch = Stopwatch.createStarted(); local 50 stopwatch.stop(); 51 final long elapsedMs = stopwatch.elapsed(TimeUnit.MILLISECONDS);
|
/external/caliper/caliper/src/main/java/com/google/caliper/worker/ |
MacrobenchmarkWorker.java | 29 import com.google.common.base.Stopwatch; 42 private final Stopwatch stopwatch; field in class:MacrobenchmarkWorker 50 this.stopwatch = Stopwatch.createUnstarted(ticker); 68 stopwatch.start(); 70 long nanos = stopwatch.stop().elapsed(NANOSECONDS); 71 stopwatch.reset();
|
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
StopwatchTest.java | 29 * Unit test for {@link Stopwatch}. 37 private final Stopwatch stopwatch = new Stopwatch(ticker); field in class:StopwatchTest 40 Stopwatch startedStopwatch = Stopwatch.createStarted(); 45 Stopwatch unstartedStopwatch = Stopwatch.createUnstarted(); 51 assertFalse(stopwatch.isRunning()); 52 assertEquals(0, stopwatch.elapsed(NANOSECONDS)) [all...] |
/external/guava/guava-tests/test/com/google/common/base/ |
StopwatchTest.java | 30 * Unit test for {@link Stopwatch}. 38 private final Stopwatch stopwatch = new Stopwatch(ticker); field in class:StopwatchTest 41 Stopwatch startedStopwatch = Stopwatch.createStarted(); 46 Stopwatch unstartedStopwatch = Stopwatch.createUnstarted(); 52 assertFalse(stopwatch.isRunning()); 53 assertEquals(0, stopwatch.elapsed(NANOSECONDS)) [all...] |
/external/caliper/caliper/src/main/java/com/google/caliper/runner/ |
TrialRunLoop.java | 28 import com.google.common.base.Stopwatch; 60 private final Stopwatch trialStopwatch = Stopwatch.createUnstarted();
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
RateLimiter.java | 27 import com.google.common.base.Stopwatch; 137 static RateLimiter create(SleepingStopwatch stopwatch, double permitsPerSecond) { 138 RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */); 174 SleepingStopwatch stopwatch, double permitsPerSecond, long warmupPeriod, TimeUnit unit) { 175 RateLimiter rateLimiter = new SmoothWarmingUp(stopwatch, warmupPeriod, unit); 184 private final SleepingStopwatch stopwatch; field in class:RateLimiter 202 RateLimiter(SleepingStopwatch stopwatch) { 203 this.stopwatch = checkNotNull(stopwatch); 229 doSetRate(permitsPerSecond, stopwatch.readMicros()) [all...] |
ServiceManager.java | 37 import com.google.common.base.Stopwatch; 416 final Map<Service, Stopwatch> startupTimers = Maps.newIdentityHashMap(); 483 Stopwatch stopwatch = startupTimers.get(service); local 484 if (stopwatch == null) { 485 startupTimers.put(service, Stopwatch.createStarted()); 595 for (Entry<Service, Stopwatch> entry : startupTimers.entrySet()) { 597 Stopwatch stopWatch = entry.getValue(); 598 if (!stopWatch.isRunning() && !(service instanceof NoOpService)) 644 Stopwatch stopwatch = startupTimers.get(service); local [all...] |
/external/mockito/src/test/java/org/mockitousage/verification/ |
VerificationAfterDelayTest.java | 20 import org.mockitoutil.Stopwatch; 30 import static org.mockitoutil.Stopwatch.createNotStarted; 49 private Stopwatch stopWatch; 63 stopWatch = createNotStarted(); 106 stopWatch.start(); 114 stopWatch.assertElapsedTimeIsMoreThan(100, MILLISECONDS); 138 stopWatch.start(); 142 stopWatch.assertElapsedTimeIsMoreThan(200, MILLISECONDS);
|
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/ |
StopwatchCircleView.java | 17 package com.android.deskclock.stopwatch; 33 import com.android.deskclock.data.Stopwatch; 125 final Stopwatch stopwatch = getStopwatch(); local 130 final long currentLapTime = stopwatch.getTotalTime() - priorLap.getAccumulatedTime(); 164 // If the stopwatch is not running it does not require continuous updates. 165 if (stopwatch.isRunning()) { 170 private Stopwatch getStopwatch() {
|
StopwatchFragment.java | 17 package com.android.deskclock.stopwatch; 54 import com.android.deskclock.data.Stopwatch; 67 import static com.android.deskclock.uidata.UiDataModel.Tab.STOPWATCH; 70 * Fragment that shows the stopwatch and recorded laps. 83 /** Scheduled to update the stopwatch time and current lap time while stopwatch is running. */ 86 /** Updates the user interface in response to stopwatch changes. */ 98 /** Draws the reference lap while the stopwatch is running. */ 101 /** The View containing both TextViews of the stopwatch. */ 107 /** Displays the current stopwatch time (seconds and above only). * 496 final Stopwatch stopwatch = getStopwatch(); local 520 final Stopwatch stopwatch = getStopwatch(); local 545 final Stopwatch stopwatch = getStopwatch(); local [all...] |