Examples of AscendingClock


Examples of org.apache.jackrabbit.mk.simple.AscendingClock

public class AscendingClockTest extends TestCase {

    public void testMillis() throws InterruptedException {
        long start, last;
        last = start = System.currentTimeMillis() + 10000;
        AscendingClock c = new AscendingClock(start);
        for (int i = 0; i < 10000; i++) {
            long t = c.time();
            assertTrue(t > last);
            last = t;
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.mk.simple.AscendingClock

    }

    public void testNanos() throws InterruptedException {
        long start, last;
        last = start = System.currentTimeMillis() + 10000;
        AscendingClock c = new AscendingClock(start);
        assertTrue(c.nanoTime() > last * 1000000);
        for (int i = 0; i < 10000; i++) {
            long t = c.nanoTime();
            assertTrue(t > last);
            last = t;
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.old.mk.simple.AscendingClock

public class AscendingClockTest extends TestCase {

    public void testMillis() throws InterruptedException {
        long start, last;
        last = start = System.currentTimeMillis() + 10000;
        AscendingClock c = new AscendingClock(start);
        for (int i = 0; i < 10000; i++) {
            long t = c.time();
            assertTrue(t > last);
            last = t;
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.old.mk.simple.AscendingClock

    }

    public void testNanos() throws InterruptedException {
        long start, last;
        last = start = System.currentTimeMillis() + 10000;
        AscendingClock c = new AscendingClock(start);
        assertTrue(c.nanoTime() > last * 1000000);
        for (int i = 0; i < 10000; i++) {
            long t = c.nanoTime();
            assertTrue(t > last);
            last = t;
        }
    }
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.