网站首页
编程语言
数据库
系统相关
其他分享
编程问答
performancecounter
2024-07-27
time.perf_counter() 或 time.perf_counter_ns() 给出奇怪且不正确的值
我在处理多处理时编写了这个简单的代码。frommultiprocessingimportProcess,cpu_countimporttimedefcounter(num):count=0whilecount<num:count+=1defmain():print(cpu_count())a=Process(target=counter,args=(250000