hush: add bash-compatible EPOCH variables
authorRon Yorston <rmy@pobox.com>
Mon, 15 Apr 2019 09:48:29 +0000 (10:48 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 16 Apr 2019 16:29:52 +0000 (18:29 +0200)
commita81700bc0810b2cad59d450a380ece20a8eb96a4
tree371499cb5755478247e8acaa864b89069ba71a94
parent2efa726b22e9ebb7ee6c192a0fea0c478a857219
hush: add bash-compatible EPOCH variables

Bash 5.0 added the dynamic variable EPOCHSECONDS and EPOCHREALTIME
which return the number of seconds since the Unix Epoch as an
integer or float.  These are useful for logging or tracing.

function                                             old     new   delta
get_local_var_value                                  207     302     +95
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 95/0)               Total: 95 bytes
   text    data     bss     dec     hex filename
 938702    4203    1888  944793   e6a99 busybox_old
 938797    4203    1888  944888   e6af8 busybox_unstripped

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c