1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-08-13 02:28:59 +00:00

More diagnostic messages after compilation

This commit is contained in:
Karol Stasiak 2018-02-26 01:06:09 +01:00
parent 7cd13332a3
commit 03c400a356

View File

@ -46,6 +46,7 @@ object Main {
if (args.isEmpty) {
ErrorReporting.info("For help, use --help")
}
val startTime = System.nanoTime()
val (status, c) = parser.parse(Context(Nil), args.toList)
status match {
case CliStatus.Quit => return
@ -124,7 +125,9 @@ object Main {
}
val path = Paths.get(prgOutput)
ErrorReporting.debug("Writing output to " + path.toAbsolutePath)
ErrorReporting.debug(s"Total output size: ${result.code.length} bytes")
Files.write(path, result.code)
ErrorReporting.debug(s"Total time: ${Math.round((System.nanoTime() - startTime)/1e6)} ms")
c.runFileName.foreach(program =>
new ProcessBuilder(program, path.toAbsolutePath.toString).start()
)