aboutsummaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2019-06-22 08:39:56 +0100
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2019-06-22 08:39:56 +0100
commit02748a2ded7327eb2312cddad4870403f820e70e (patch)
tree88b22662335d38a163db830d4ec0df73cca8c9d1 /script
parentd292beb8ef57033694ee767ec36e1ce746ff636a (diff)
downloadperlweeklychallenge-club-02748a2ded7327eb2312cddad4870403f820e70e.tar.gz
perlweeklychallenge-club-02748a2ded7327eb2312cddad4870403f820e70e.tar.bz2
perlweeklychallenge-club-02748a2ded7327eb2312cddad4870403f820e70e.zip
- Added timing to script.
Diffstat (limited to 'script')
-rwxr-xr-xscript/find-the-winner10
1 files changed, 10 insertions, 0 deletions
diff --git a/script/find-the-winner b/script/find-the-winner
index d14d18dfcf..4a6c6f39f1 100755
--- a/script/find-the-winner
+++ b/script/find-the-winner
@@ -90,3 +90,13 @@ sub read_data {
package main;
PerlWeeklyChallenge->new_with_options->run;
+
+END {
+ my $time = time - $^T;
+ my $mm = $time / 60;
+ my $ss = $time % 60;
+ my $hh = $mm / 60;
+ $mm = $mm % 60;
+
+ print sprintf("The program ran for %02d:%02d:%02d.\n", $hh, $mm, $ss);
+}