From f36877ecf039c53ba43ca4ebcc8c465412d12fd6 Mon Sep 17 00:00:00 2001 From: Kerin Millar Date: Tue, 13 Aug 2024 13:44:19 +0100 Subject: Check for EPOCHREALTIME support in a safer manner Given that the EPOCHREALTIME variable loses its special properties if unset, to compare two expansions of it to one another ought to be more robust. Signed-off-by: Kerin Millar --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index a47bb2b..b19831d 100644 --- a/functions.sh +++ b/functions.sh @@ -940,7 +940,7 @@ _update_pid() _update_time() { # shellcheck disable=3028 - if [ "${BASH_VERSINFO:-0}" -ge 5 ]; then + if [ "${EPOCHREALTIME}" != "${EPOCHREALTIME}" ]; then # shellcheck disable=2034,3045 _update_time() { -- cgit v1.2.3-65-gdbad