Index: trunk/install/perl/tvrecording.pl =================================================================== --- trunk/install/perl/tvrecording.pl (リビジョン 1) +++ trunk/install/perl/tvrecording.pl (リビジョン 8) @@ -24,5 +24,5 @@ -use Time::HiRes qw(usleep); +#use Time::HiRes qw(usleep); @@ -250,15 +250,20 @@ } #1分前にプロセス起動するから指定時間スリープ -srand(time ^ ($$ + ($$ << 15))); -my $useconds = int(rand(12000000)); -my $intval = int ($useconds / 1000000); -my $startupsleeptimemicro = ($startupsleeptime * 1000000) - $useconds; -$reclengthsec = $reclengthsec + $intval + 1; +#srand(time ^ ($$ + ($$ << 15))); +#my $useconds = int(rand(12000000)); +#my $intval = int ($useconds / 1000000); +#my $startupsleeptimemicro = ($startupsleeptime * 1000000) - $useconds; +#$reclengthsec = $reclengthsec + $intval + 1; +#&writelog("tvrecording: DEBUG SLEEP $startupsleeptime:$useconds:$intval:$startupsleeptimemicro"); +# usleep ( $startupsleeptimemicro ); + # $recch でウェイト調整入れましょう - - -&writelog("tvrecording: DEBUG SLEEP $startupsleeptime:$useconds:$intval:$startupsleeptimemicro"); - - usleep ( $startupsleeptimemicro ); +my $intval = $recch % 50; # 0〜49 +my $startupsleep = $startupsleeptime - $intval; # 3〜52 (VHF 40-51) +$reclengthsec = $reclengthsec + $intval + 1; # + +&writelog("tvrecording: DEBUG SLEEP $startupsleeptime:$intval:$startupsleep"); + +sleep ( $startupsleep); if ($recunits > 1){