Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Eta shtuka gruzit cpu na 99%
- // ั:
- namespace KEK
- {
- class Program
- {
- static void Main(string[] args)
- {
- System.Console.Write("Your cpu threads count: ");
- Initialize(System.Convert.ToInt32(System.Console.ReadLine()));
- }
- private static void CpuUsage()
- {
- while (true)
- {
- int i = 0;
- if (i > 0) { }
- }
- }
- public static void Initialize(int threads)
- {
- System.Threading.Thread[] threadz = new System.Threading.Thread[12];
- for (int i = 0; i < threadz.Length; i++)
- {
- threadz[i] = new System.Threading.Thread(CpuUsage);
- threadz[i].Start();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement