Ever needed to max out the CPU on a Windows OS for testing, here is a quick VBScript to produce 100% CPU Usage.. (Source is from VMware VCP410 Course)
Dim goal Dim before Dim x Dim y Dim i goal = 2181818 Do While True before = Timer For i = 0 to goal x = 0.000001 y = sin(x) y = y + 0.00001 Next y = y + 0.01 WScript.Echo "I did three million sines in " & Int(Timer - before + 0.5) & " seconds!" Loop
Advertisement