mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fhem.pl: allow sleep 0, fix InternalTimer bug
git-svn-id: https://svn.fhem.de/fhem/trunk@13593 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8d795e5de3
commit
f6c8660223
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user