mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Not used.
This commit is contained in:
commit
61d94cdc6b
2 changed files with 3 additions and 3 deletions
|
@ -93,7 +93,7 @@ private class Main @Inject constructor(
|
||||||
|
|
||||||
var result = 0
|
var result = 0
|
||||||
val latestVersionFuture = github.latestKobaltVersion
|
val latestVersionFuture = github.latestKobaltVersion
|
||||||
val seconds = benchmark("build", {
|
val seconds = benchmark {
|
||||||
try {
|
try {
|
||||||
result = runWithArgs(jc, args, argv)
|
result = runWithArgs(jc, args, argv)
|
||||||
} catch(ex: KobaltException) {
|
} catch(ex: KobaltException) {
|
||||||
|
@ -102,7 +102,7 @@ private class Main @Inject constructor(
|
||||||
} finally {
|
} finally {
|
||||||
executors.shutdown()
|
executors.shutdown()
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
log(1, if (result != 0) "BUILD FAILED: $result" else "BUILD SUCCESSFUL ($seconds seconds)")
|
log(1, if (result != 0) "BUILD FAILED: $result" else "BUILD SUCCESSFUL ($seconds seconds)")
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.beust.kobalt.misc
|
package com.beust.kobalt.misc
|
||||||
|
|
||||||
public fun benchmark(message: String, run: () -> Unit) : Long {
|
public fun benchmark(run: () -> Unit) : Long {
|
||||||
val start = System.currentTimeMillis()
|
val start = System.currentTimeMillis()
|
||||||
run()
|
run()
|
||||||
return (System.currentTimeMillis() - start) / 1000
|
return (System.currentTimeMillis() - start) / 1000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue