|
本帖最后由 爱电脑的昕宇 于 2022-8-6 18:52 编辑
https://pan.huang1111.cn/s/GNbMCW
快来和我的老台式(奔腾)比比吧!
源码:
import time
from tkinter import *
from tkinter.ttk import *
from tkinter.messagebox import showinfo
def about():
showinfo('CPU Test', '爱电脑的昕宇作品\n结果仅供参考。\n作者的测试结果:4405404')
def main():
n = 0
sta = time.time()
while True:
n = n + 1
runt = time.time() - sta
if runt - 1 > 0:
break
print(n)
Label(win, text='得分:' + str(n)).pack()
win = Tk()
win.resizable(0, 0)
win.minsize(200, 50)
menu1 = Menu(win)
menu1.add_command(label='关于', command=lambda: about())
win.config(menu=menu1)
Button(win, text='测试', command=lambda: main()).pack()
win.mainloop()
|
-
-
CT.py
699 Bytes, 下载次数: 336
|