Package org.rioproject.impl.watch

Examples of org.rioproject.impl.watch.StopWatch.stopTiming()


        checkData(0, watch);

        for (int i = 0; i < 10; i++) {
            watch.setStartTime(System.currentTimeMillis());
            watch.stopTiming();
            checkData(i + 1, watch);
        }

        Utils.close(watch.getWatchDataSource());
    }
View Full Code Here


        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());
    }
View Full Code Here

        checkData(0, watch);

        for (int i = 0; i < 10; i++) {
            Utils.sleep(100);
            watch.stopTiming();
            mon.waitFor(i + 1);
            Calculable[] calcs = watch.getWatchDataSource().getCalculable();
            Assert.assertEquals(i + 1, calcs.length);
            Assert.assertTrue(calcs[0].getValue() > 0);
            for (int j = 1; j < calcs.length; j++) {
View Full Code Here

        }

        for (int i = 0; i < 10; i++) {
            watch.startTiming();
            Utils.sleep(100);
            watch.stopTiming();
            checkData(10 + i + 1, watch);
        }

        Utils.close(watch.getWatchDataSource());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.