def trackerSec(self): """ trackerSec takes the time received by the EyeTracker.trackerTime() method and returns the time in sec.usec-msec format. Args: None Return: float: The eye tracker hardware's reported current time in sec.msec-usec format. """ return (pEyeGaze.lct_TimerRead(None)*self.DEVICE_TIMEBASE_TO_SEC) - pEyeGaze.EgGetApplicationStartTimeSec()
def trackerTime(self): """ trackerTime returns the current time reported by the eye tracker device. EyeGaze reports tracker time in usec. Args: None Return: float: The eye tracker hardware's reported current time. """ return pEyeGaze.lct_TimerRead(None)
def trackerTime(self): """ trackerTime returns the current time reported by the eye tracker device. EyeGaze reports tracker time in usec. Args: None Return: float: The eye tracker hardware's reported current time. """ return pEyeGaze.lct_TimerRead(None)-(pEyeGaze.EgGetApplicationStartTimeSec()/self.DEVICE_TIMEBASE_TO_SEC)
def trackerSec(self): """ trackerSec takes the time received by the EyeTracker.trackerTime() method and returns the time in sec.usec-msec format. Args: None Return: float: The eye tracker hardware's reported current time in sec.msec-usec format. """ return pEyeGaze.lct_TimerRead(None) * self.DEVICE_TIMEBASE_TO_SEC
def trackerTime(self): """ trackerTime returns the current time reported by the eye tracker device. EyeGaze reports tracker time in usec. Args: None Return: float: The eye tracker hardware's reported current time. """ return pEyeGaze.lct_TimerRead(None) - ( pEyeGaze.EgGetApplicationStartTimeSec() / self.DEVICE_TIMEBASE_TO_SEC)
# For the example, collect 1000+ samples of data samples_rx = 0 rec_start = timeit.default_timer() MAX_SAMPLES = 100 while samples_rx < MAX_SAMPLES: # This is the 'doing something else' part in the example. time.sleep(0.005) # we'll use async. mode, getting avail samples # and then 'do something else'. while eyegaze_control.iNPointsAvailable: pEyeGaze.EgGetData(byref(eyegaze_control)) # assume monocular for this example only. ;) sample_data0 = eyegaze_control.pstEgData[0] stime = sample_data0.dGazeTimeSec current_time = (pEyeGaze.lct_TimerRead( None) / 1000000.0) - pEyeGaze.EgGetApplicationStartTimeSec() delay = current_time - stime gaze_x = sample_data0.iIGaze gaze_y = sample_data0.iJGaze print 'Sample Time: {0}\t{1}\t{2}\tX: {3}\tY: {4}\ti: {5}'.format(stime, current_time, delay, gaze_x, gaze_y, samples_rx) samples_rx += 1 if samples_rx > MAX_SAMPLES: break rec_end = timeit.default_timer() # stop recording eyegaze_control.bTrackingActive = False # Exit the lcteg system result = pEyeGaze.EgInit(byref(eyegaze_control))
# For the example, collect 1000+ samples of data samples_rx = 0 rec_start = timeit.default_timer() MAX_SAMPLES = 100 while samples_rx < MAX_SAMPLES: # This is the 'doing something else' part in the example. time.sleep(0.005) # we'll use async. mode, getting avail samples # and then 'do something else'. while eyegaze_control.iNPointsAvailable: pEyeGaze.EgGetData(byref(eyegaze_control)) # assume monocular for this example only. ;) sample_data0 = eyegaze_control.pstEgData[0] stime = sample_data0.dGazeTimeSec current_time = (pEyeGaze.lct_TimerRead(None) / 1000000.0 ) - pEyeGaze.EgGetApplicationStartTimeSec() delay = current_time - stime gaze_x = sample_data0.iIGaze gaze_y = sample_data0.iJGaze print 'Sample Time: {0}\t{1}\t{2}\tX: {3}\tY: {4}\ti: {5}'.format( stime, current_time, delay, gaze_x, gaze_y, samples_rx) samples_rx += 1 if samples_rx > MAX_SAMPLES: break rec_end = timeit.default_timer() # stop recording eyegaze_control.bTrackingActive = False
def trackerSec(self): """ """ return pEyeGaze.lct_TimerRead(None) * self.DEVICE_TIMEBASE_TO_SEC
def trackerTime(self): """ """ return pEyeGaze.lct_TimerRead(None)