如图所示的百分比时间
3条回答 默认 最新
- The 祺℡ 2020-12-29 17:30关注
using System; using System.Diagnostics; using System.Threading; namespace ConsoleApp1 { class Program { static void Main(string[] args) { PerformanceCounter diskRt = new PerformanceCounter("PhysicalDisk", "% Disk Write Time", "0 C:"); PerformanceCounter diskWt = new PerformanceCounter("PhysicalDisk", "% Disk Read Time", "0 C:"); PerformanceCounter diskTt = new PerformanceCounter("PhysicalDisk", "% Disk Time", "0 C:"); while (true) { Thread.Sleep(1000); // wait for 1 second Console.WriteLine("% Disk Read Time =" + diskRt.NextValue() + " %."); Console.WriteLine("% Disk Write Time = " + diskWt.NextValue() + " %."); Console.WriteLine("% Disk Time = " + diskTt.NextValue() + " %."); } } } }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决评论 打赏 举报无用 1
悬赏问题
- ¥50 求恶意流量检测系统搭建教程( C++ python C)
- ¥15 mmseqs内存报错
- ¥15 vika文档如何与obsidian同步
- ¥15 华为手机相册里面的照片能够替换成自己想要的照片吗?
- ¥15 陆空双模式无人机飞控设置
- ¥15 sentaurus lithography
- ¥100 求抖音ck号 或者提ck教程
- ¥15 关于#linux#的问题:子进程1等待子进程A、B退出后退出(语言-c语言)
- ¥20 web页面如何打开Outlook 365的全球离线通讯簿功能
- ¥15 io.jsonwebtoken.security.Keys