mirror of
https://github.com/curl/curl.git
synced 2026-07-30 00:58:06 +03:00
tests: try to make sleeping portable by avoiding select
select does not support just waiting on Windows: https://perldoc.perl.org/perlport.html#select Reviewed-By: Daniel Stenberg Closes #5035
This commit is contained in:
parent
1eecb0e022
commit
9aaca09044
3 changed files with 37 additions and 8 deletions
|
|
@ -493,7 +493,7 @@ sub sendcontrol {
|
|||
|
||||
for(@a) {
|
||||
sockfilt $_;
|
||||
select(undef, undef, undef, 0.01);
|
||||
portable_sleep(0.01);
|
||||
}
|
||||
}
|
||||
my $log;
|
||||
|
|
@ -530,7 +530,7 @@ sub senddata {
|
|||
# pause between each byte
|
||||
for (split(//,$l)) {
|
||||
sockfiltsecondary $_;
|
||||
select(undef, undef, undef, 0.01);
|
||||
portable_sleep(0.01);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3199,7 +3199,7 @@ while(1) {
|
|||
logmsg("Sleep for $delay seconds\n");
|
||||
my $twentieths = $delay * 20;
|
||||
while($twentieths--) {
|
||||
select(undef, undef, undef, 0.05) unless($got_exit_signal);
|
||||
portable_sleep(0.05) unless($got_exit_signal);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue