зеркало из https://github.com/mozilla/pjs.git
usage, allow for different exe names, e.g. mozilla or netscape or galeon
This commit is contained in:
Родитель
50acc36854
Коммит
a689aa5acc
|
@ -2,7 +2,14 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Script to time mozilla startup.
|
# Script to time mozilla startup.
|
||||||
|
# Feeds in start time as url argument, startup-test.html
|
||||||
|
# takes this arg and computes the time difference.
|
||||||
|
# So something like this happens:
|
||||||
#
|
#
|
||||||
|
# mozilla file:/foo/startup-test.html?begin=T
|
||||||
|
# where T = ms since 1970, e.g.:
|
||||||
|
# mozilla file:/foo/startup-test.html?begin=999456977124
|
||||||
|
#
|
||||||
|
|
||||||
require 5.003;
|
require 5.003;
|
||||||
|
|
||||||
|
@ -11,20 +18,22 @@ require "gettime.pl";
|
||||||
use strict;
|
use strict;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
|
||||||
#
|
sub PrintUsage {
|
||||||
# mozilla file:/foo/startup-test.html?begin=T
|
die <<END_USAGE
|
||||||
# where T = seconds since 1970, e.g.:
|
usage: startup-unix.pl <exe>
|
||||||
# mozilla file:/foo/startup-test.html?begin=999456977000
|
END_USAGE
|
||||||
#
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
# Build up command string.
|
PrintUsage() if $#ARGV != 0;
|
||||||
my $cwd = Cwd::getcwd();
|
|
||||||
my $time = Time::PossiblyHiRes::getTime();
|
# Build up command string.
|
||||||
my $cmd = "mozilla \"file:$cwd/startup-test.html?begin=" . $time . "\"";
|
my $cwd = Cwd::getcwd();
|
||||||
print "cmd = $cmd\n";
|
my $time = Time::PossiblyHiRes::getTime();
|
||||||
|
my $cmd = "@ARGV[0] \"file:$cwd/startup-test.html?begin=" . $time . "\"";
|
||||||
# Run the command.
|
print "cmd = $cmd\n";
|
||||||
exec $cmd;
|
|
||||||
|
# Run the command.
|
||||||
|
exec $cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче