本文整理汇总了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()
示例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'
示例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'
示例4: disableHighPriority
# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
def disableHighPriority(self):
Computer.disableHighPriority()
示例5: disableHighPriority
# 需要导入模块: from psychopy.iohub import Computer [as 别名]
# 或者: from psychopy.iohub.Computer import disableHighPriority [as 别名]
def disableHighPriority(self):
return Computer.disableHighPriority()