From f6c8660223dfa1e5ee7f0cff14454126fa96a6c2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 4 Mar 2017 07:53:44 +0000 Subject: [PATCH] fhem.pl: allow sleep 0, fix InternalTimer bug git-svn-id: https://svn.fhem.de/fhem/trunk@13593 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 515fbd20b..dc3be1142 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -2852,7 +2852,7 @@ CommandSleep($$) Log 4, "sleeping for $sec"; - if(@cmdList && $sec && $init_done) { + if(@cmdList && $init_done) { my %h = (cmd => join(";", @cmdList), evalSpecials => $evalSpecials, quiet => $quiet, @@ -2928,6 +2928,7 @@ InternalTimer($$$;$) { my ($tim, $fn, $arg, $waitIfInitNotDone) = @_; + $tim = 1 if(!$tim); if(!$init_done && $waitIfInitNotDone) { select(undef, undef, undef, $tim-gettimeofday()); no strict "refs";