Executes function fn "repeat" times and prints execution time in seconds. If repeat
is an integer and an optional "output" argument is specified, each test's result
is appended to that vector, then the vector is returned. If repeat is nil, then
the function is run once and the result returned. Otherwise, the result is discarded.
Examples:
var test = func { getprop("/sim/aircraft"); }
debug.benchmark("test()/1", test, 1000);
debug.benchmark("test()/2", func setprop("/sim/aircraft", ""), 1000);
var results = debug.benchmark("test()", test, 1000, []);
print(" Results were:");
print(" ", debug.string(results));