Adding check for Time::HiRes for gettimeofday(), this perl package can give us 1ms resolution instead of default of 1s resolution. tbox instances will need to symlink in gettime.pl.

This commit is contained in:
mcafee%netscape.com 2001-09-25 01:36:11 +00:00
Родитель 2b0c9d0438
Коммит 33ac716846
1 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -18,7 +18,9 @@ use POSIX qw(sys_wait_h strftime);
use Cwd;
use File::Basename; # for basename();
use Config; # for $Config{sig_name} and $Config{sig_num}
$::UtilsVersion = '$Revision: 1.71 $ ';
$::UtilsVersion = '$Revision: 1.72 $ ';
package TinderUtils;
@ -27,6 +29,10 @@ package TinderUtils;
#
require "post-mozilla.pl" if -e "post-mozilla.pl";
#
# Test for Time::HiRes, for ms resolution from gettimeofday().
#
require "gettime.pl";
sub Setup {
InitVars();
@ -841,7 +847,13 @@ sub run_all_tests {
# Generate URL of form file:///<cwd>/startup-test.html?begin=986869495000
# Where begin value is current time.
my ($time, $url, $cwd, $cmd);
$time = time() . "000"; # looks stupid, but 'time()*1000' returns a negative
#
#$time = time() . "000"; # looks stupid, but 'time()*1000' returns a negative
#
# Test for Time::HiRes and report the time.
$time = Time::PossiblyHiRes::getTime();
$cwd = Cwd::getcwd();
print "cwd = $cwd\n";
$url = "\"file:$binary_dir/startup-test.html?begin=$time\"";