diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-03-05 17:14:45 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-03-05 17:14:45 +0000 |
commit | 58033491c6d0bac82315c1fdb1ec9b39be58093f (patch) | |
tree | c69c3aa67ec66758066e959bd0d533ea336ec236 /bin/PerlACE/Process.pm | |
parent | 2efc882384a34f61311a24fc641d1b5fd5776356 (diff) | |
download | ATCD-TAO-1_5.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_5'.TAO-1_5
Diffstat (limited to 'bin/PerlACE/Process.pm')
-rw-r--r-- | bin/PerlACE/Process.pm | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/bin/PerlACE/Process.pm b/bin/PerlACE/Process.pm deleted file mode 100644 index 9d671598f96..00000000000 --- a/bin/PerlACE/Process.pm +++ /dev/null @@ -1,62 +0,0 @@ -# $Id$ - -package PerlACE::Process; - -use strict; -use English; -use POSIX qw(:time_h); - -$PerlACE::Process::ExeSubDir = './'; - -sub delay_factor { - my($lps) = 128; - my($factor) = 1; - - ## Keep increasing the loops per second until the amount of time - ## exceeds the number of clocks per second. The original code - ## did not multiply $ticks by 8 but, for faster machines, it doesn't - ## seem to return false values. The multiplication is done to minimize - ## the amount of time it takes to determine the correct factor. - while(($lps <<= 1)) { - my($ticks) = clock(); - for(my $i = $lps; $i >= 0; $i--) { - } - $ticks = clock() - $ticks; - if ($ticks * 8 >= CLOCKS_PER_SEC) { - $factor = 500000 / (($lps / $ticks) * CLOCKS_PER_SEC); - last; - } - } - - return $factor; -} - -### Check for -ExeSubDir commands, store the last one -my @new_argv = (); - -for(my $i = 0; $i <= $#ARGV; ++$i) { - if ($ARGV[$i] eq '-ExeSubDir') { - if (defined $ARGV[$i + 1]) { - $PerlACE::Process::ExeSubDir = $ARGV[++$i].'/'; - } - else { - print STDERR "You must pass a directory with ExeSubDir\n"; - exit(1); - } - } - else { - push @new_argv, $ARGV[$i]; - } -} -@ARGV = @new_argv; - -$PerlACE::Process::WAIT_DELAY_FACTOR = $ENV{"ACE_RUNTEST_DELAY"}; - -if ($OSNAME eq "MSWin32") { - require PerlACE::Process_Win32; -} -else { - require PerlACE::Process_Unix; -} - -1; |