当前位置: 首页>>代码示例>>Python>>正文


Python Computer.disableHighPriority方法代码示例

本文整理汇总了Python中psychopy.iohub.Computer.disableHighPriority方法的典型用法代码示例。如果您正苦于以下问题:Python Computer.disableHighPriority方法的具体用法?Python Computer.disableHighPriority怎么用?Python Computer.disableHighPriority使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在psychopy.iohub.Computer的用法示例。


在下文中一共展示了Computer.disableHighPriority方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: spinDownTest

# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
    def spinDownTest(self):
        # OK, we have collected the number of requested getEvents, that have returned >0 events
        # so _close psychopy window
        self.psychoWindow.close()

        # disable high priority in both processes
        Computer.disableHighPriority()
开发者ID:balajisriram,项目名称:psychopy,代码行数:9,代码来源:run.py

示例2: test_procPriority

# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
    def test_procPriority(self):
        local_priority = Computer.getPriority()
        iohub_priority_rpc = self.io.getPriority()
        assert local_priority == 'normal'
        assert iohub_priority_rpc == 'normal'

        priority_level = Computer.setPriority('high', True)
        assert priority_level == 'high'
        priority_level = self.io.setPriority('high', True)
        assert priority_level == 'high'
        priority_level = Computer.setPriority('normal')
        assert priority_level == 'normal'
        priority_level = self.io.setPriority('normal')
        assert priority_level == 'normal'

        priority_level = Computer.setPriority('realtime')
        assert priority_level == 'realtime'
        priority_level = self.io.setPriority('realtime')
        assert priority_level == 'realtime'
        priority_level = Computer.setPriority('normal')
        assert priority_level == 'normal'
        priority_level = self.io.setPriority('normal')
        assert priority_level == 'normal'

        # >> Deprecated functionality tests
        psycho_proc = Computer.psychopy_process
        iohub_proc = Computer.getIoHubProcess()

        psycho_priority = Computer.getProcessPriority(psycho_proc)
        iohub_priority = Computer.getProcessPriority(iohub_proc)
        assert psycho_priority == 'normal'
        assert local_priority == psycho_priority
        assert iohub_priority == 'normal'
        assert iohub_priority == iohub_priority_rpc

        priority_change_ok = Computer.enableHighPriority()
        new_psycho_priority = Computer.getProcessPriority(psycho_proc)
        assert priority_change_ok == False or new_psycho_priority == 'high'

        priority_change_ok = self.io.enableHighPriority()
        new_io_priority = Computer.getProcessPriority(iohub_proc)
        assert priority_change_ok == False or new_io_priority == 'high'

        priority_change_ok = Computer.disableHighPriority()
        new_psycho_priority = Computer.getProcessPriority(psycho_proc)
        assert priority_change_ok == False or new_psycho_priority == 'normal'

        priority_change_ok = self.io.disableHighPriority()
        new_io_priority = Computer.getProcessPriority(iohub_proc)
        assert priority_change_ok == False or new_io_priority == 'normal'
开发者ID:DennisEckmeier,项目名称:psychopy,代码行数:52,代码来源:test_computer.py

示例3: test_procPriority

# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
    def test_procPriority(self):
        psycho_proc = Computer.psychopy_process
        iohub_proc = Computer.getIoHubProcess()

        psycho_priority = Computer.getProcessPriority(psycho_proc)
        iohub_priority = Computer.getProcessPriority(iohub_proc)
        assert psycho_priority == 'normal'
        assert iohub_priority == 'normal'

        priority_change_ok = Computer.enableHighPriority()
        new_psycho_priority = Computer.getProcessPriority(psycho_proc)
        assert priority_change_ok == False or new_psycho_priority == 'high'

        priority_change_ok = self.io.enableHighPriority()
        new_io_priority = Computer.getProcessPriority(iohub_proc)
        assert priority_change_ok == False or new_io_priority == 'high'

        priority_change_ok = Computer.disableHighPriority()
        new_psycho_priority = Computer.getProcessPriority(psycho_proc)
        assert priority_change_ok == False or new_psycho_priority == 'normal'

        priority_change_ok = self.io.disableHighPriority()
        new_io_priority = Computer.getProcessPriority(iohub_proc)
        assert priority_change_ok == False or new_io_priority == 'normal'
开发者ID:Lx37,项目名称:psychopy,代码行数:26,代码来源:test_computer.py

示例4: disableHighPriority

# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
 def disableHighPriority(self):
     Computer.disableHighPriority()
开发者ID:BrainTech,项目名称:psychopy,代码行数:4,代码来源:server.py

示例5: disableHighPriority

# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
 def disableHighPriority(self):
     return Computer.disableHighPriority()
开发者ID:Lx37,项目名称:psychopy,代码行数:4,代码来源:server.py


注:本文中的psychopy.iohub.Computer.disableHighPriority方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。