用户:(●ˇ∀ˇ●)獭獭查看:0 回复:1 评论:0 创建时间:2023-02-02T13:55:40
【作品展示】

【作品介绍】
主要检测cpu百分比系统调用
【作品源代码】
import easygui
from playsound import playsound
import winsound
import psutil
# Beep at 1000 Hz for 100 ms
winsound.Beep(1000,100)
easygui.msgbox('开始检测', 'Codemao', '继续⇨')
# millisecond
duration = 1000
# Hz
freq = 440
winsound.Beep(freq, duration)
# python 3 .x
frequency = 2000
duration = 1000
winsound.Beep(frequency,duration)
print(psutil.cpu_percent(), '%')
print(psutil.cpu_stats())
print(psutil.cpu_freq())
print('第一行显示', 'cpu使用率')
print('第二行显示', '上下文切换,中断,软件中断,系统调用数量')
print('第三行显示', '以MHz为单位给出当前最小、最大cpu频率')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn