From: Mark Wooding Date: Fri, 24 Jul 2015 17:35:21 +0000 (+0100) Subject: lib/Odin.pm, mason/common/autohandler: Track time of the current job. X-Git-Url: https://git.distorted.org.uk/~mdw/odin-cgi/commitdiff_plain/503f7910db83c22537705f378c0317e18b80170b lib/Odin.pm, mason/common/autohandler: Track time of the current job. --- diff --git a/lib/Odin.pm b/lib/Odin.pm index 28118c8..a9bff5a 100644 --- a/lib/Odin.pm +++ b/lib/Odin.pm @@ -50,6 +50,10 @@ our $PASTEBIN = "$BASEURL$PASTEBIN_PATH"; ###-------------------------------------------------------------------------- ### Miscellaneous utilities. +our $NOW; +sub update_now () { $NOW = time; } +update_now; + (our $PROG = $0) =~ s:^.*/::; sub fail_cmdline ($$%) { diff --git a/mason/common/autohandler b/mason/common/autohandler index 9630ac8..23b0f1b 100644 --- a/mason/common/autohandler +++ b/mason/common/autohandler @@ -54,6 +54,10 @@ Error\ %# +<%init> + Odin::update_now; + +%# <%once> use utf8; use Odin;