Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun profile(f: () -> Unit) {
- val t1 = System.currentTimeMillis()
- f()
- val t2 = System.currentTimeMillis()
- println("Delta: ${t2 - t1}")
- }
- fun myFunction():Unit {
- slowQuery(47)
- }
- fun main() {
- profile(::myFunction)
- }
Add Comment
Please, Sign In to add comment