diff --git a/stdlib/ktSrc/System.kt b/stdlib/ktSrc/System.kt new file mode 100644 index 00000000000..42c0c045ce0 --- /dev/null +++ b/stdlib/ktSrc/System.kt @@ -0,0 +1,10 @@ +namespace std.util + +/** +Executes current block and returns elapsed time in milliseconds +*/ +fun millisTime(block: fun() : Unit) : Long { + val start = System.currentTimeMillis() + block() + return System.currentTimeMillis() - start +} \ No newline at end of file