我有一个多线程的应用程序(4)线程我想知道有多少处理时间线程度过。我创建了所有这些线程与线程池
I have a multi-threaded application with (4) thread i want to know how much processing time spent in threads. I've created all these threads with ThreadPool
线程1做JOB1 线程2做JOB2 .. ..
Thread1 doing job1 Thread2 doing job2 .. ..
结果将是: 线程1是在12毫秒运行 线程2是在20毫秒运行
result would be: Thread1 was running in 12 millisecond Thread2 was running in 20 millisecond
其实我已经下载一个网页的工作,每一个工作是在处理一个线程,我想知道多少时间它需要一个网页下载(没有其他线程上下文切换的亲情计算时间
我发现在$ C $的CProject这code:
I found this code on codeproject:
http://www.$c$cproject.com/KB/dotnet/ExecutionStopwatch.aspx
试试吧,报到;)