@Test public void testStartTiming() throws RemoteException { StopWatch watch = new StopWatch("watch"); Assert.assertEquals(0, watch.getStartTime()); long prevStartTime = -1; for (int i = 0; i < 10; i++) { Utils.sleep(100); watch.startTiming(); long startTime = watch.getStartTime(); Assert.assertTrue(startTime >= 0); if (prevStartTime != -1) { Assert.assertTrue(startTime > prevStartTime); } prevStartTime = startTime; } checkData(0, watch); for (int i = 0; i < 10; i++) { watch.startTiming(); Utils.sleep(100); watch.stopTiming(); checkData(i + 1, watch); } Utils.close(watch.getWatchDataSource()); }
public void startTiming() { setStartTime(System.currentTimeMillis()); }
StopWatch extends ThresholdWatch implements StopWatchMBean { public void startTiming() { setStartTime(System.currentTimeMillis()); } }
StopWatch extends ThresholdWatch implements StopWatchMBean { public void startTiming() { setStartTime(System.currentTimeMillis()); } StopWatch(String id);  StopWatch(String id, Configuration config); @SuppressWarnings("unused")  StopWatch(WatchDataSource watchDataSource, String id); }
StopWatch extends ThresholdWatch implements StopWatchMBean { public void startTiming() { setStartTime(System.currentTimeMillis()); } StopWatch(String id);  StopWatch(String id, Configuration config); @SuppressWarnings("unused")  StopWatch(WatchDataSource watchDataSource, String id); void startTiming(); void stopTiming(); void stopTiming(String detail); void setElapsedTime(long elapsed); void setElapsedTime(long elapsed, String detail); void setElapsedTime(long elapsed, long now); void setElapsedTime(long elapsed, long now, String detail); long getStartTime(); void setStartTime(long startTime); }
StopWatch extends ThresholdWatch implements StopWatchMBean { public void startTiming() { setStartTime(System.currentTimeMillis()); } StopWatch(String id);  StopWatch(String id, Configuration config); @SuppressWarnings("unused")  StopWatch(WatchDataSource watchDataSource, String id); void startTiming(); void stopTiming(); void stopTiming(String detail); void setElapsedTime(long elapsed); void setElapsedTime(long elapsed, String detail); void setElapsedTime(long elapsed, long now); void setElapsedTime(long elapsed, long now, String detail); long getStartTime(); void setStartTime(long startTime); static final String VIEW; }