From 554605ee04946160e360354c4aee9102c877ac19 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 4 Jul 2003 16:27:36 +0000 Subject: 18810: Various enhancements and bug fixes for the TCP function suite --- Functions/TCP/tcp_expect | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Functions/TCP/tcp_expect') diff --git a/Functions/TCP/tcp_expect b/Functions/TCP/tcp_expect index 14963a3e6..e49f93804 100644 --- a/Functions/TCP/tcp_expect +++ b/Functions/TCP/tcp_expect @@ -37,8 +37,12 @@ emulate -L zsh setopt extendedglob -# Get extra accuracy by making SECONDS floating point locally -typeset -F SECONDS +if [[ ${(t)SECONDS} != float* ]]; then + # If called from another function, use that + typeset -F TCP_SECONDS_START=$SECONDS + # Get extra accuracy by making SECONDS floating point locally + typeset -F SECONDS +fi # Variables are all named _expect_* to avoid problems with the -p param. local _expect_opt _expect_pvar -- cgit 1.4.1