Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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