コード例 #1
0
 def __init__(self, screenHz=None, win=None, name='StaticPeriod'):
     """
     :param screenHz: the frame rate of the monitor (leave as None if you don't want this accounted for)
     :param win: if a visual.Window is given then StaticPeriod will also pause/restart frame interval recording
     :param name: give this StaticPeriod a name for more informative logging messages
     """
     self.status = NOT_STARTED
     self.countdown = CountdownTimer()
     self.name = name
     self.win = win
     if screenHz is None:
         self.frameTime = 0
     else:
         self.frameTime = 1.0 / screenHz