コード例 #1
0
ファイル: core.py プロジェクト: papr/psychopy
def getTime():
    """Get the current time since psychopy.core was loaded.

    Version Notes: Note that prior to PsychoPy 1.77.00 the behaviour of getTime()
    was platform dependent (on OSX and linux it was equivalent to :func:`psychopy.core.getAbsTime`
    whereas on windows it returned time since loading of the module, as now)"""
    return monotonicClock.getTime()
コード例 #2
0
ファイル: core.py プロジェクト: papr/psychopy
def getTime():
    """Get the current time since psychopy.core was loaded.

    Version Notes: Note that prior to PsychoPy 1.77.00 the behaviour of getTime()
    was platform dependent (on OSX and linux it was equivalent to :func:`psychopy.core.getAbsTime`
    whereas on windows it returned time since loading of the module, as now)"""
    return monotonicClock.getTime()
コード例 #3
0
ファイル: test_core.py プロジェクト: bergwiesel/psychopy
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")
コード例 #4
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")