1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

Not used.

This commit is contained in:
Cedric Beust 2015-12-02 19:07:54 -08:00
commit 61d94cdc6b
2 changed files with 3 additions and 3 deletions

View file

@ -93,7 +93,7 @@ private class Main @Inject constructor(
var result = 0
val latestVersionFuture = github.latestKobaltVersion
val seconds = benchmark("build", {
val seconds = benchmark {
try {
result = runWithArgs(jc, args, argv)
} catch(ex: KobaltException) {
@ -102,7 +102,7 @@ private class Main @Inject constructor(
} finally {
executors.shutdown()
}
})
}
log(1, if (result != 0) "BUILD FAILED: $result" else "BUILD SUCCESSFUL ($seconds seconds)")

View file

@ -1,6 +1,6 @@
package com.beust.kobalt.misc
public fun benchmark(message: String, run: () -> Unit) : Long {
public fun benchmark(run: () -> Unit) : Long {
val start = System.currentTimeMillis()
run()
return (System.currentTimeMillis() - start) / 1000