Created
June 27, 2017 05:12
-
-
Save jshvarts/c9ce808c048183506b3663fc94d4acc4 to your computer and use it in GitHub Desktop.
measureTimeMillis of for loop
This file contains 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
val forLoopMillisElapsed = measureTimeMillis { | |
for (i in 0..10_000_000) { | |
if (i % 2 == 0) { | |
// do something | |
} | |
} | |
} | |
println("forLoopMillisElapsed: $forLoopMillisElapsed") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment