// returns minimal time needed static long benchFor5Seconds(S desc, Runnable r) { ret benchForNSeconds(desc, r, 5); } static long benchFor5Seconds(Runnable r) { ret benchFor5Seconds(str(r), r); } // returns result of function static A benchFor5Seconds(S desc default str(f), IF0 f) { benchFor5Seconds(r { f! }); ret f!; } static A benchFor5Seconds(IF0 f) { ret benchFor5Seconds(str(f), f); }