Exemplo n.º 1
0
def testLoggingDefaultClock():
    try:
        t1=logging.defaultClock.getTime()
        t2=getTime()
        t3=monotonicClock.getTime()

        assert np.fabs(t1-t2) < 0.02
        assert np.fabs(t1-t3) < 0.02
        assert np.fabs(t3-t2) < 0.02

        assert logging.defaultClock.getLastResetTime() == monotonicClock.getLastResetTime()

        printf(">> logging.defaultClock Test: PASSED")

    except Exception:
        printf(">> logging.defaultClock Test: FAILED. ")
        printExceptionDetails()

    printf("-------------------------------------\n")
Exemplo n.º 2
0
def testLoggingDefaultClock():
    try:
        t1=logging.defaultClock.getTime()
        t2=getTime()
        t3=monotonicClock.getTime()

        assert np.fabs(t1-t2) < 0.02
        assert np.fabs(t1-t3) < 0.02
        assert np.fabs(t3-t2) < 0.02

        assert logging.defaultClock.getLastResetTime() == monotonicClock.getLastResetTime()

        printf(">> logging.defaultClock Test: PASSED")

    except Exception:
        printf(">> logging.defaultClock Test: FAILED. ")
        printExceptionDetails()

    printf("-------------------------------------\n")