3 package PerlACE
::Process
;
9 $PerlACE::Process
::ExeSubDir
= './';
15 ## Keep increasing the loops per second until the amount of time
16 ## exceeds the number of clocks per second. The original code
17 ## did not multiply $ticks by 8 but, for faster machines, it doesn't
18 ## seem to return false values. The multiplication is done to minimize
19 ## the amount of time it takes to determine the correct factor.
22 for(my $i = $lps; $i >= 0; $i--) {
24 $ticks = clock
() - $ticks;
25 if ($ticks * 8 >= CLOCKS_PER_SEC
) {
26 $factor = 500000 / (($lps / $ticks) * CLOCKS_PER_SEC
);
33 ### Check for -ExeSubDir commands, store the last one
36 for(my $i = 0; $i <= $#ARGV; ++$i) {
37 if ($ARGV[$i] eq '-ExeSubDir') {
38 if (defined $ARGV[$i + 1]) {
39 $PerlACE::Process
::ExeSubDir
= $ARGV[++$i].'/';
42 print STDERR
"You must pass a directory with ExeSubDir\n";
47 push @new_argv, $ARGV[$i];
52 $PerlACE::Process
::WAIT_DELAY_FACTOR
= (defined $ENV{'ACE_RUNTEST_DELAY'}) ?
$ENV{'ACE_RUNTEST_DELAY'} : 1;
54 # Set the process's target. If there's none, behavior falls back to pre-target
59 $self->{TARGET
} = shift;
62 if ($OSNAME eq "MSWin32") {
63 require PerlACE
::Process_Win32
;
65 elsif ($OSNAME eq "VMS") {
66 require PerlACE
::Process_VMS
;
69 require PerlACE
::Process_Unix
;