Reverting problematic commits:
fa500f453dAlex Tkachman Today 19:47725bebc23fAlex Tkachman Today 19:36
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package std.util
|
||||
|
||||
/**
|
||||
Executes current block and returns elapsed time in milliseconds
|
||||
*/
|
||||
fun measureTimeMillis(block: () -> Unit) : Long {
|
||||
val start = System.currentTimeMillis()
|
||||
block()
|
||||
return System.currentTimeMillis() - start
|
||||
}
|
||||
|
||||
/**
|
||||
Executes current block and returns elapsed time in milliseconds
|
||||
*/
|
||||
fun measureTimeNano(block: () -> Unit) : Long {
|
||||
val start = System.nanoTime()
|
||||
block()
|
||||
return System.nanoTime() - start
|
||||
}
|
||||
Reference in New Issue
Block a user