using System;
using System.Threading;
using JetBrains.dotTrace.Api;
namespace Test1
{
internal class Program
{
private static void WorkerThread()
{
while (true)
{
Thread.Sleep(2000);
}
}
private static void Main(string[] args)
{
//Create a bunch of workers
for (int i = 0; i < 10; i++)
new Thread(WorkerThread) {Name = ("Worker " + i), IsBackground = true}.Start();
Thread.Sleep(1500);
CPUProfiler.Start();
Thread.Sleep(1000);
for (int i = 0; i < 10000; i++)
{
double j = Math.Sqrt(i);
}
CPUProfiler.StopAndSaveSnapShot();
}
}
}