scope MyBenchmarkScope initializer onInit
    private function BenchmarkFunction takes nothing returns nothing
        
    endfunction

    private function onInit takes nothing returns nothing
        local integer i = 0
        local player p = GetLocalPlayer()
        
        loop
            call BenchmarkFunction()
            set i = i + 1
            call DisplayTimedTextToPlayer(p, 0.0, 0.0, 60.0, I2S(i))
        endloop
    endfunction
endscope
