os.getPriority([pid])


  • pid <integer> 要获取调度优先级的进程 ID。 默认值: 0
  • 返回:<integer>

返回由 pid 指定的进程的调度优先级。如果未提供 pidpid0,则返回当前进程的优先级。

【Returns the scheduling priority for the process specified by pid. If pid is not provided or is 0, the priority of the current process is returned.】