Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
minutest-hooks
fun TestContext<*>.withTestTiming() {
var start: Long? = null
before {
start = System.currentTimeMillis()
}
after {
start?.let {
val timeTaken = System.currentTimeMillis() - it
println("Test took ${timeTaken}ms")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment