Rename measureTimeNano to measureNanoTime

This commit is contained in:
Ilya Gorbunov
2016-01-26 23:36:07 +03:00
parent d46501e11b
commit eabac9dcf6
+7 -1
View File
@@ -14,8 +14,14 @@ public inline fun measureTimeMillis(block: () -> Unit) : Long {
/**
* Executes the given block and returns elapsed time in nanoseconds.
*/
public inline fun measureTimeNano(block: () -> Unit) : Long {
public inline fun measureNanoTime(block: () -> Unit) : Long {
val start = System.nanoTime()
block()
return System.nanoTime() - start
}
/**
* Executes the given block and returns elapsed time in nanoseconds.
*/
@Deprecated("Use measureNanoTime.", ReplaceWith("measureNanoTime(block)"), level = DeprecationLevel.ERROR)
public inline fun measureTimeNano(block: () -> Unit) : Long = measureNanoTime(block)