private suspend fun someSuspendedFunction(): Collection { //is a suspended function as well return qrScanTimer.time { //why can't I put the return here instead? when (process.exitValue()) { 0 -> { log.info("QR scan completed successfully.") //huh?? return@time resultsAdapter.fromJson(scanResults)!! } 1 -> throw RecoverableQrScanError() 2 -> throw UnrecoverableQrScanError() else -> throw UnknownQrScanError(process.exitValue()) } } }