[Orca-checkins] r301 - in trunk/orca: . packages/Time-HiRes-1.55 packages/Time-HiRes-1.57 packages/Time-HiRes-1.57/t

Blair Zajac blair at orcaware.com
Fri Apr 9 08:19:03 PDT 2004


Author: blair
Date: Fri Apr  9 08:18:39 2004
New Revision: 301

Added:
   trunk/orca/packages/Time-HiRes-1.57/
      - copied from r300, trunk/orca/packages/Time-HiRes-1.55/
Removed:
   trunk/orca/packages/Time-HiRes-1.55/
Modified:
   trunk/orca/INSTALL
   trunk/orca/configure.in
   trunk/orca/packages/Time-HiRes-1.57/Changes
   trunk/orca/packages/Time-HiRes-1.57/HiRes.pm
   trunk/orca/packages/Time-HiRes-1.57/HiRes.xs
   trunk/orca/packages/Time-HiRes-1.57/META.yml
   trunk/orca/packages/Time-HiRes-1.57/Makefile.PL
   trunk/orca/packages/Time-HiRes-1.57/t/HiRes.t
Log:
Upgrade Time::HiRes from 1.55 to 1.57.

* INSTALL (Determine which Perl modules need compiling and installing):
  Update all references to Time::HiRes's version number from 1.55 to
  1.57.

* configure.in:
  Bump Time::HiRes's version number to 1.57.

* packages/Time-HiRes-1.57:
  Renamed from packages/Time-HiRes-1.55.  Directory contents updated
  from Time-HiRes-1.57.tar.gz.


Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL	(original)
+++ trunk/orca/INSTALL	Fri Apr  9 08:18:39 2004
@@ -177,7 +177,7 @@
     Math::IntervalSearch    >= 1.05        >= 1.05      1.05
     RRDs                    >= 1.000461    >= 1.0.46    1.0.46
     Storable                >= 2.12        >= 2.12      2.12
-    Time::HiRes             Not required by Orca        1.55
+    Time::HiRes             Not required by Orca        1.57
 
     All seven of these modules are included with the Orca distribution
     in the packages directory.  When you configure Orca in step 3),
@@ -278,10 +278,10 @@
 
     Time::HiRes
 
-      http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.55.tar.gz
+      http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.57.tar.gz
 
-      % gunzip -c Time-HiRes-1.55.tar.gz | tar xvf -
-      % cd Time-HiRes-1.55
+      % gunzip -c Time-HiRes-1.57.tar.gz | tar xvf -
+      % cd Time-HiRes-1.57
       % perl Makefile.PL
       % make
       % make test

Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in	(original)
+++ trunk/orca/configure.in	Fri Apr  9 08:18:39 2004
@@ -41,8 +41,8 @@
 RRDTOOL_VER=1.000461
 STORABLE_DIR=Storable-2.12
 STORABLE_VER=2.12
-TIME_HIRES_DIR=Time-HiRes-1.55
-TIME_HIRES_VER=1.55
+TIME_HIRES_DIR=Time-HiRes-1.57
+TIME_HIRES_VER=1.57
 
 AC_SUBST(COMPRESS_ZLIB_DIR)
 AC_SUBST(DATA_DUMPER_DIR)

Modified: trunk/orca/packages/Time-HiRes-1.57/Changes
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.55/Changes	(original)
+++ trunk/orca/packages/Time-HiRes-1.57/Changes	Fri Apr  9 08:18:39 2004
@@ -1,5 +1,16 @@
 Revision history for Perl extension Time::HiRes.
 
+1.57
+	- Window/Cygwin: if the performance counter drifts by more than
+	  two seconds from the system clock (due to ntp adjustments,
+	  for example), recalibrate our internal counter: from Jan Dubois,
+	  based on [cpan #5933] by Jerry D. Hedden.
+
+1.56
+	- Give a clearer message if the tests timeout (perl change #22253)
+	- Don't use /tmp or its moral equivalents (perl bug #15036,
+	  perl change #22258)
+
 1.55
 	- Windows: ming32 patch from Mike Pomraning (use Perl's Const64()
 	  instead of VC-specific i64 suffix)

Modified: trunk/orca/packages/Time-HiRes-1.57/HiRes.pm
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.55/HiRes.pm	(original)
+++ trunk/orca/packages/Time-HiRes-1.57/HiRes.pm	Fri Apr  9 08:18:39 2004
@@ -15,7 +15,7 @@
 		 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
 		 d_nanosleep);
 	
-$VERSION = '1.55';
+$VERSION = '1.57';
 $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 

Modified: trunk/orca/packages/Time-HiRes-1.57/HiRes.xs
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.55/HiRes.xs	(original)
+++ trunk/orca/packages/Time-HiRes-1.57/HiRes.xs	Fri Apr  9 08:18:39 2004
@@ -181,6 +181,12 @@
 #undef gettimeofday
 #define gettimeofday(tp, not_used) _gettimeofday(aTHX_ tp, not_used)
 
+/* If the performance counter delta drifts more than 2 seconds from the
+ * system time then we recalibrate to system time.  This means we may
+ * move *backwards* in time! */
+
+#define MAX_DIFF Const64(20000000)
+
 static int
 _gettimeofday(pTHX_ struct timeval *tp, void *not_used)
 {
@@ -190,11 +196,19 @@
     FT_t ft;
 
     if (MY_CXT.run_count++) {
+	__int64 diff;
+	FT_t filtim;
+	GetSystemTimeAsFileTime(&filtim.ft_val);
         QueryPerformanceCounter((LARGE_INTEGER*)&ticks);
         ticks -= MY_CXT.base_ticks;
         ft.ft_i64 = MY_CXT.base_systime_as_filetime.ft_i64
                     + Const64(10000000) * (ticks / MY_CXT.tick_frequency)
                     +(Const64(10000000) * (ticks % MY_CXT.tick_frequency)) / MY_CXT.tick_frequency;
+	diff = ft.ft_i64 - MY_CXT.base_systime_as_filetime.ft_i64;
+	if (diff < -MAX_DIFF || diff > MAX_DIFF) {
+	     MY_CXT.base_ticks = ticks;
+	     ft.ft_i64 = filtim.ft_i64;
+	}
     }
     else {
         QueryPerformanceFrequency((LARGE_INTEGER*)&MY_CXT.tick_frequency);

Modified: trunk/orca/packages/Time-HiRes-1.57/META.yml
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.55/META.yml	(original)
+++ trunk/orca/packages/Time-HiRes-1.57/META.yml	Fri Apr  9 08:18:39 2004
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Time-HiRes
-version:      1.55
+version:      1.57
 version_from: HiRes.pm
 installdirs:  perl
 requires:

Modified: trunk/orca/packages/Time-HiRes-1.57/Makefile.PL
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.55/Makefile.PL	(original)
+++ trunk/orca/packages/Time-HiRes-1.57/Makefile.PL	Fri Apr  9 08:18:39 2004
@@ -71,19 +71,11 @@
 # without changing it, and then I'd always forget to change it before a
 # release. Sorry, Edward :)
 
-sub TMPDIR {
-    my $TMPDIR =
-	(grep(defined $_ && -d $_ && -w _,
-	      ((defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : undef),
-	       qw(/var/tmp /usr/tmp /tmp c:/temp))))[0];
-    $TMPDIR || die "Cannot find writable temporary directory.\n";
-}
-
 sub try_compile_and_link {
     my ($c, %args) = @_;
 
     my ($ok) = 0;
-    my ($tmp) = (($^O eq 'VMS') ? "sys\$scratch:tmp$$" : TMPDIR() . '/' . "tmp$$");
+    my ($tmp) = "tmp$$";
     local(*TMPC);
 
     my $obj_ext = $Config{obj_ext} || ".o";
@@ -388,7 +380,7 @@
 	    'SUFFIX'   => 'gz',
 	},
         clean => { FILES => "xdefine" },
-        realclean => {FILES=> 'const-c.inc const-xs.inc'},
+        realclean => { FILES=> 'const-c.inc const-xs.inc' },
     );
 
     if ($ENV{PERL_CORE}) {
@@ -453,7 +445,8 @@
             print  <<EOM;
 NOTE: if you get an error like this (the line number may vary):
 Makefile:91: *** missing separator
-then set the environment variable LC_ALL to "C" and retry.
+then set the environment variable LC_ALL to "C" and retry
+from scratch (re-run perl "Makefile.PL").
 
 EOM
         }

Modified: trunk/orca/packages/Time-HiRes-1.57/t/HiRes.t
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.55/t/HiRes.t	(original)
+++ trunk/orca/packages/Time-HiRes-1.57/t/HiRes.t	Fri Apr  9 08:18:39 2004
@@ -42,7 +42,7 @@
 	if ($pid == 0) { # We are the kid, set up the timer.
 	    print "# Timer process $$\n";
 	    sleep($waitfor);
-	    warn "$0: Time's up!\n";
+	    warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded\n";
 	    print "# Terminating the testing process\n";
 	    kill('TERM', getppid());
 	    print "# Timer process exiting\n";



More information about the Orca-checkins mailing list