Package org.apache.logging.log4j.core.async

Examples of org.apache.logging.log4j.core.async.SystemClock


public class SystemClockTest {

    @Test
    public void testLessThan2Millis() {
        long millis1 = new SystemClock().currentTimeMillis();
        long sysMillis = System.currentTimeMillis();

        long diff = sysMillis - millis1;

        assertTrue("diff too large: " + diff, diff <= 1);
View Full Code Here


    }

    @Test
    public void testAfterWaitStillLessThan2Millis() throws Exception {
        Thread.sleep(100);
        long millis1 = new SystemClock().currentTimeMillis();
        long sysMillis = System.currentTimeMillis();

        long diff = sysMillis - millis1;

        assertTrue("diff too large: " + diff, diff <= 1);
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.async.SystemClock

Copyright © 2018 www.massapicom. 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.