Code: Select all
OpenLibrary(0,"kernel32.dll")
CallFunction(0,"GetTickCount",)
Code: Select all
x.f = 1
y.f = 1.000001
; change to desired amount of loops
howManyLoops = 100000000
OpenConsole()
PrintN("")
PrintN("Running Benchmark of "+Str(howManyLoops)+" loops.")
starttime = GetTickCount_()
For i = 1 To howManyLoops
x = x * y
Next i
stoptime = GetTickCount_()
totalSeconds.f = stoptime - starttime
totalSeconds = totalSeconds / 1000
PrintN("")
PrintN("Computer ran through "+Str(howManyLoops)+" loops in "+StrF(totalSeconds,2)+" seconds.")
PrintN(""):PrintN(""):PrintN(""):PrintN(""):PrintN(""):PrintN("Press almost any key to continue.")
Repeat:Until Inkey()<>""
CloseConsole()
End