Skip to content

Commit

Permalink
Start timer after mkdir instead of before
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Nov 19, 2018
1 parent 569836d commit fe80ab2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ program
spinner.start();
}

const start = process.hrtime();

if (!tmp) {
tmp = path.join(os.tmpdir(), 'warshield');
}
Expand All @@ -101,6 +99,8 @@ program
process.stdout.write('Starting encrypting files...\n');
}

const start = process.hrtime();

const encryption = warshield.encryptRecursive(file, key, tmp);

encryption.on('crawl-found', filename => {
Expand Down Expand Up @@ -192,8 +192,6 @@ program
spinner.start();
}

const start = process.hrtime();

if (!tmp) {
tmp = path.join(os.tmpdir(), 'warshield');
}
Expand All @@ -214,6 +212,8 @@ program
process.stdout.write('Starting decrypting files...\n');
}

const start = process.hrtime();

const decryption = warshield.decryptRecursive(file, key, tmp);

decryption.on('crawl-found', filename => {
Expand Down

0 comments on commit fe80ab2

Please sign in to comment.