Skip to content

Commit

Permalink
Merge pull request #34 from hankei6km/topic/elapsed-time
Browse files Browse the repository at this point in the history
feat: Add 'print-elapsed-time' flag
  • Loading branch information
hankei6km authored Aug 10, 2023
2 parents afa236e + d7e0bd3 commit 2571a45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ export async function activate(_context: ExtensionContext) {
} else {
process = await wasm.createProcess(runArgs.cmdName, module, options)
}
const started = Date.now()
const result = await process.run()
if (runArgs.runArgs['print-elapsed-time']) {
stdoutWrite(stdio.out, `${Date.now() - started}\n`)
}
return result
}
return 1
Expand Down

0 comments on commit 2571a45

Please sign in to comment.