Created
July 15, 2019 08:41
-
-
Save talosdev/5dd7bae8edadc30565b4d7dcf1b8570a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline fun<T> measureTimeMillisPair(function: () -> T): Pair<T, Long> { | |
| val startTime = System.currentTimeMillis() | |
| val result: T = function.invoke() | |
| val endTime = System.currentTimeMillis() | |
| return Pair(result, endTime - startTime) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment