1 Revision history for Perl extension Time::HiRes.
4 - ITIMER_VIRTUAL detection in HiRes.t had problems (that we cannot
5 in the general case fail already at 'use' is suboptimal)
6 - fixes to the documentation of clock_gettime() and clock_getres()
9 - add support for the POSIX clock_gettime() and clock_getres(),
10 if available, either as library calls or as syscalls
11 - be more defensive about missing functionality: break out
12 early (during 'use') if no e.g. clock_getres() is available,
13 and protect our back by trapping those cases also in HiRes.xs
14 - the test added in 1.76 could cause an endless loop e.g. in Solaris,
15 due to mixing of sleep() and alarm() (bad programmer, no cookie!)
18 - testing for nanosleep had wrong logic which caused nanosleep
19 to become undefined for e.g. Mac OS X
20 - added a test for a core dump that was introduced by Perl 5.8.0
21 safe signals and was fixed for the time of 5.8.1 (one report of
22 the core dump was [perl #20920]), the test skipped pre-5.8.1.
23 - *cough* s/unanosleep/nanosleep/g; *cough*
26 - installation patch from Gisle Aas: in Perls 5.8.x and later
27 use MakeMaker INSTALLDIRS value of 'perl' instead of 'site'.
30 - [cpan #14608] Solaris 8 perl 5.005_03 File::Spec module does not have method rel2abs
31 (the workaround is not to use rel2abs, should not be necessary)
32 - [cpan #14642] U2time wrongly exported on the C API
33 (patch supplied by the reporter, SALVA@cpan.org)
34 - add release dates to Changes
37 - Time::HiRes::nanosleep support for Solaris [PATCH]
38 (POSIX::uname() not available if building with core perl,
39 from Gisle Aas, via perl5-porters, perl change #25295)
42 - going back to the 1.68 loader setup (using DynaLoader)
43 since too many weird things starting breaking
44 - fix a typo in José Auguste-Etienne's name
47 - a thinko in the nanosleep() detection
48 - move more changes stuff from the README to Changes
49 - add -w to the Makefile.PL
52 - oops in 1.69 about @ISA (not affecting anything but silly)
53 - add copyright 2005 to HiRes.pm
54 - add copyright and license to HiRes.xs
55 - add copyrights 2003, 2004, 2005 to README
58 - actually run a test for nanosleep
59 (if there is no $Config{d_nanosleep}) since e.g. in AIX 4.2
60 it seems that one can link in nanosleep() but then calling
61 it fails instantly and sets errno to ENOSYS (Not implemented).
62 This may be fixable in the AIX case by figuring out the right
63 (realtime POSIX?) libs and whatnot, but in the general case
64 running a real test case is better. (Of course, this change
65 will no doubt run into portability problems because of the
66 execution step...) Note that because of hysterical raisins
67 most Perls do NOT have $Config{d_nanosleep} (scanning for
68 it by Configure would in many platforms require linking in
69 things like -lrt, which would in many platforms be a bad idea
71 (from José Auguste-Etienne)
72 - support XSLoader also since it's much faster
74 - add SEE ALSO (BSD::Resource and Time::TAI64)
77 - somehow 1.67 had a lot of doubled lines (a major cut-and-paste
78 error suspected), but miraculously it still worked since the
79 doubling took place below the __END__ token
80 - undef Pause() before defining it to avoid redefinition warnings
81 during compilation in case perl.h had already defined Pause()
82 (part of perl change #24271)
86 - (internal) don't ignore the return value of gettimeofday()
87 - (external) return undef or an empty if the C gettimeofday() fails
88 (affects Time::HiRes gettimeofday() and the hires time())
92 - fix the 'hierachy' typo in Makefile.PL [rt.cpan.org #8492]
93 - should now build in Solaris [rt.cpan.org #7165] (since 1.64)
94 - should now build in Cygwin [rt.cpan.org #7535] (since 1.64)
95 - close also [rt.cpan.org #5933] "Time::HiRes::time does not pick up time adjustments like ntp" since ever reproducing it in the same environment
96 has become rather unlikely
99 - one should not mix u?alarm and sleep (the tests modified
100 by 1.65, #12 and #13, hung in Solaris), now we just busy
101 loop executing an empty block
102 - in the documentation underline the unspecificity of mixing
104 - small spelling fixes
107 - regenerate ppport.h with Devel::PPPort 3.03,
108 now the MY_CXT_CLONE is defined in ppport.h,
109 we no more need to do that.
111 - the test #12 would often hang in sigsuspend() (at least that's
112 where Mac OS X' ktrace shows it hanging). With the sleep()s
113 changed to sleep(1)s, the tests still pass but no hang after
114 a few hundred repeats.
117 - Win32 and any ithread build: ppport.h didn't define
118 MY_CXT_CLONE, which seems to be a Time-HiResism.
121 - Skip testing if under PERL_CORE and Time::HiRes has not
122 been Configured (from Marcus Holland-Moritz, core change
124 - Use ppport.h generated by Devel::PPPort 3.01,
125 allowing cutting away our own portability code.
126 - Don't use $ENV{PERL_CORE} for < 5.6.0.
127 - Don't use "for my $i" for <= 5.003.
128 - Don't use Pause() for <= 5.003.
129 - Can't use newSVpvf for <= 5.003.
130 (most of the changes from Marcus)
133 - Win32: reset reading from the performance counters every
134 five minutes to better track wall clock time (thanks to
135 PC timers being often quite bad), should help long-running
139 - Win32: Patch from Steve Hay
140 [PATCH] Re: [perl #30755] [Win32] Different results from Time::HiRes::gettimeofdayunder the debugger
141 to [perl #30755] reported by Nigel Sandever
143 - Cygwin: Use the Win32 recalibration code also in Cygwin if the
144 <w32api/windows.h> APIs are available. Cygwin testing by
145 Yitzchak Scott-Thoennes.
147 - Solaris: use -lposix4 to get nanosleep for Solaris 2.6,
148 after that keep using -lrt, patch from Alan Burlison,
149 bug reported in [cpan #7165]
152 - Change the Win32 recalibration limit to 0.5 seconds and tweak
153 the documentation to blather less about the gory details of the
154 Win32 implementation and more about the complications in general
155 of meddling with the system clock.
158 - Document the 1.57 change better.
161 - Win32/Cygwin/MinGW: if the performance counter drifts by more
162 than two seconds from the system clock (due to ntp adjustments,
163 for example), recalibrate our internal counter: from Jan Dubois,
164 based on [cpan #5933] by Jerry D. Hedden.
167 - Give a clearer message if the tests timeout (perl change #22253)
168 - Don't use /tmp or its moral equivalents (perl bug #15036,
172 - Windows: mingw32 patch from Mike Pomraning (use Perl's Const64()
173 instead of VC-specific i64 suffix)
176 - Solaris: like Tru64 (dec_osf) also Solaris need -lrt for nanosleep
179 - Windows: higher resolution time() by using the Windows
180 performance counter API, from Jan Dubois and Anton Shcherbinin.
181 The exact new higher resolution depends on the hardware,
182 but it should be quite a bit better than using the basic
186 - In AIX (v?) with perl 5.6.1 the HiRes.t can hang after
187 the subtest 18. No known analysis nor fix, but added
188 an alarm (that requires fork() and alarm()) to the test.
191 - doc tweaks from mjd (perl change #20456)
192 - NCR MP-RAS hints file added (svr4.pl) (perl change #21249)
195 - add a message (for non-core builds) to Makefile.PL about
196 the LC_ALL=C workaround
197 - &Time::HiRes::d_nanosleep was broken (perl change #20131)
198 - the nanosleep() probe was broken (perl change #20061)
199 - use existence instead of definedness for feature probes
201 - MPE/iX tweak (perl change #20042)
202 - do not use HAS_NANOSLEEP (perl change #19898)
205 - UVuf for non-IVSIZE platforms (from Keiichiro Nagano)
206 - OS/2 can always mix subsecond sleeps with signals
207 (part of perl change #19789)
210 - workaround for buggy gcc 2.95.3 in openbsd/sparc64
214 - do not use -lrt in Linux (from March Lehmann, perl change #19449)
215 - unnecessary (nanosleep is in libc anyway)
216 - harmful (-lrt slows down execution)
217 - incompatible (with many distributions' pthreads)
220 - do not create files in blib directories under core
221 (perl change #19160, from rgs)
222 - detypo s/VTLARM/VTARLM/ (perl change #19328, from mjd)
225 - guarantee that $xdefine in HiRes.t is always defined
226 (perl change #19109, from IlyaZ)
227 - a cleaner way to detect PERL_CORE (perl change #19111,
231 - add hints/irix.pl to turn off overly POSIX flags that
232 cause hide struct timespec to be hidden (and compilation
233 to fail) (bleadperl change #19085)
234 - documentation tweaks
237 - add c:/temp to the list of temp directories to probe
238 so that cygwin (and win*?) builds are happy. This was
239 needed at least in my cygwin 1.3.20/w2k setup.
242 - modernize the constants code (from Nicholas Clark)
245 - At some point the ability to figure our the correct incdir
246 for EXTERN.h (either a core perl build, or an installed perl)
247 had broken (which lead into all test compiles failing with
248 a core perl build, but thanks to the robustness of Makefile.PL
249 nothing of this was visible). The brokenness seemed to be
250 caused by $ENV{PERL_CORE} not being on for core builds?
251 Now stole a trick from the Encode that sets $ENV{PERL_CORE}
252 right, and both styles of build should work again.
255 - Nicholas Clark noticed that the my_catdir() emulation function
256 was broken (which means that we didn't really work for Perls
258 - inspired by fixing the above made the whole Makefile.PL -w
260 - tightened up the Makefile.PL output, less whitespace
263 - fix from Craig Berry for better building in VMS with PERL_CORE
266 - no functional changes
267 - move lib/Time/HiRes.pm as Hires.pm
268 - libraries scanning was slightly broken (always scanned
269 for a library even when $Config{libs} already had it)
272 - Ray Zimmerman ran into a race condition in Mac OS X.
273 A 0.01-second alarm fired before the test expected.
274 The test first slept indefinitely (blocking for signals)
275 and only after that tested for the signal having been sent.
276 Since the signal had already been sent, the test #12 never
277 completed. The solution: test first, then block.
278 - default to being silent on all probing attempts, set the
279 environment variable VERBOSE to a true value to see the
280 details (the probing command and the possible errors)
283 - do not clear MAN3PODS in Makefile.PL (Radoslaw Zielinski)
284 - INSTALLDIRS => 'perl' missing which means that Time::HiRes
285 cannot be upgraded from CPAN to override the 5.8.0 version
287 - Time::HiRes 1.35 could not be dropped as-is to bleadperl
288 because the include directories did not adjust themselves
289 if $ENV{PERL_CORE} (Hugo van der Sanden)
290 - add documentation about the restart of select() under alarm()
293 - small documentation tweaks
297 - better VMS operation (Craig Berry)
300 - our time machine is accelerating: now works with Perl 5.004_01
301 (tried with 5.003_07 and 5.002 but I get segmentation faults
302 from running the Makefile.PL with those in Tru64 4.0D)
305 - backward compatibility (pre-5.6.0) tweaks:
306 - no XSLoader in 5.00503, use DynaLoader instead
307 - no SvPV_nolen, either
308 - no PerlProc_pause(), either
309 - now tested with 5.00404 and 5.00503
310 - Makefile.PL requires 5.00404 (no more 5.002)
311 - use nanosleep instead of usleep, if it is available (Wilson Snyder)
312 (this means that one can mix subsecond sleeps with alarms)
313 - because of nanosleep we probe for -lrt and -lposix4
314 - the existence of getitimer/nanosleep/setitimer/ualarm/usleep
315 is available by exportable constants Time::HiRes::d_func
316 (since older Perl do not have them in %Config, and even
317 5.8.0 does not probe for nanosleep)
320 - backward compatibility (pre-5.6.1) tweaks:
321 - define NV if no NVTYPE
322 - define IVdf if needed (note: the Devel::PPPort
323 in 5.8.0 does not try hard hard enough since
324 the IVSIZE might not be defined)
325 - define NVgf if needed
326 - grab the typemap from 5.8.0 for the NV stuff
328 1.31 and 1.32 add more backward compatibility (now all the way
329 back to Perl 5.00404), and using nanosleep() (if available) for
334 - release 1.29_02 as 1.30
336 1.30 adds all the changes made during the Perl 5.6->5.7->5.8
337 development cycle. Most notably portability across platforms has been
338 enhanced, and the interval timers (setitimer, getitimer) have been
339 added. Note that the version of Time::HiRes that is included in Perl
340 5.8.0 calls itself 1.20_00, but it is equivalent to this Time::HiRes
341 version. Note also that in 1.30 Wegscheid turns over the maintenance
342 to Jarkko Hietaniemi.
346 - fix a silly unclosed comment typo in HiRes.xs
347 - document and export REALTIME_REALPROF (Solaris)
351 - only getitimer(ITIMER_REAL) available in Cygwin and Win32
352 (need to patch this also in Perl 5.[89])
353 - remove CVS revision log from HiRes.xs
357 The following numbered patches refer to the Perl 5.7 changes,
358 you can browse them at http://public.activestate.com/cgi-bin/perlbrowse
360 - 17558: Add #!./perl to the .t
361 - 17201: linux + usemorebits fix, from Rafael Garcia-Suarez
362 - 16198: political correctness, from Simon Cozens
363 - 15857: doc tweaks, from Jarkko Hietaniemi
364 - 15593: optimization in .xs, from Paul Green
365 - 14892: pod fixes, from Robin Barker
366 - 14100: VOS fixes, from Paul Green
367 - 13422: XS segfault, from Marc Lehmann
368 - 13378: whether select() gets restarted on signals, depends
369 - 13354: timing constraints, again, from Andy Dougherty
370 - 13278: can't do subecond alarms with ualarm;
371 break out early if alarms do not seem to be working
372 - 13266: test relaxation (cygwin gets lower hires
373 times than lores ones)
374 - 12846: protect against high load, from Jarkko Hietaniemi
375 - 12837: HiRes.t VMS tweak, from Craig A. Berry
376 - 12797: HiRes.t VMS tweak, from Charles Lane
377 - 12769: HiRes.t VMS tweak, from Craig A. Berry
378 - 12744: gcc vs MS 64-bit constant syntax, from Nick Ing-Simmons
379 - 12722: VMS ualarm for VMS without ualarm, from Charles Lane
380 - 12692: alarm() ain't gonna work if ualarm() ain't,
381 from Gurusamy Sarathy
382 - 12680: minor VMS tweak, from Charles Lane
383 - 12617: don't try to print ints as IVs, from Jarkko Hietaniemi
384 - 12609: croak on negative time, from Jarkko Hietaniemi
385 - 12595: Cygwin rounds up for time(), from Jarkko Hietaniemi
386 - 12594: MacOS Classic timeofday, from Chris Nandor
387 - 12473: allow for more than one second for sleep() and usleep()
388 - 12458: test tuning, relax timing constraints,
389 from Jarkko Hietaniemi
390 - 12449: make sleep() and usleep() to return the number
391 of seconds and microseconds actually slept (analogously
392 with the builtin sleep()), also make usleep() croak if
393 asked for more than 1_000_000 useconds, from Jarkko Hietaniemi
394 - 12366: Time::HiRes for VMS pre-7.0, from Charles Lane
395 - 12199: do not use ftime on Win32, from Gurusamy Sarathy
396 - 12196: use ftime() on Win32, from Artur Bergman
397 - 12184: fix Time::HiRes gettimeofday() on Win32, from Gurusamy Sarathy
398 - 12105: use GetSystemTime() on Win32, from Artur Bergman
399 - 12060: explain the 1e9 seconds problem, from Jarkko Hietaniemi
400 - 11901: UNICOS sloppy division, from Jarkko Hietaniemi
401 - 11797: problem in HiRes.t, from John P. Linderman
402 - 11414: prototype from Time::HiRes::sleep(), from Abhijit Menon-Sen
403 - 11409: Time::HiRes qw(sleep) failed, from Abhijit Menon-Sen
404 - 11270: dynix/ptx 4.5.2 hints fix, from Peter Prymmer
405 - 11032: VAX VMS s/div/lib\$ediv/ fix, from Peter Prymmer
406 - 11011: VAX VMS s/qdiv/div/ fix, from Peter Prymmer
407 - 10953: SCO OpenServer 5.0.5 requires an explicit -lc for usleep(),
409 - 10942: MPE/IX test tweaks, from Mark Bixby
410 - 10784: unnecessary pod2man calls, from Andy Dougherty
411 - 10354: ext/ + -Wall, from Doug MacEachern
412 - 10320: fix the BOOT section to call myU2time correctly
413 - 10317: correct casting for AIX< from H. Merijn Brand
414 - 10119: document that the core time() may be rounding, not truncating
415 - 10118: test fix, from John Peacock
416 - 9988: long =item, from Robin Barker
417 - 9714: correct test output
418 - 9708: test also the scalar aspect of getitimer()
419 - 9705: Add interval timers (setitimer, getitimer)
420 - 9692: do not require at least 5.005 using XS
422 The following changes were made on top of the changes
423 made for Time::HiRes during the Perl 5.7 development
424 cycle that culminated in the release of Perl 5.8.0.
426 - add "require 5.005" to the Makefile.PL
427 - remove the REVISION section (CVS log) from HiRes.pm
428 - add jhi's copyright alongside Douglas'
429 - move HiRes.pm to lib/Time/
431 - modify HiRes.t to use $ENV{PERL_CORE}
432 - modify the original Time::HiRes version 1.20 Makefile.PL
433 to work both with Perl 5.8.0 and the new code with pre-5.8.0
434 Perls (tried with 5.6.1)
435 - tiny tweaks and updates in README and TODO
436 - bump the VERSION to 1.29
438 1.20 Wed Feb 24 21:30 1999
439 - make our usleep and ualarm substitutes into hrt_usleep
440 and hrt_ualarm. This helps static links of Perl with other
441 packages that also have usleep, etc. From
442 Ilya Zakharevich <ilya@math.ohio-state.edu>
443 - add C API stuff. From Joshua Pritikin
444 <joshua.pritikin@db.com>
445 - VMS Makefile.PL fun. From pvhp@forte.com (Peter Prymmer)
446 - hopefully correct "-lc" fix for SCO.
449 1.20 adds a platform neutral set of C accessible routines if you are
450 running 5.005+. All other changes are packaging changes and build
451 fixes(?) for statically linked Perl, SCO, and VMS.
453 1.19 Tue Sep 29 22:30 1998
454 - put VMS gettimeofday() in. Patch is from Sebastian Bazley
455 <seb@stian.demon.co.uk>
456 - change GIMME_V to GIMME to help people with older versions of
458 - fix Win32 version of gettimeofday(). It didn't affect anything,
459 but it confuses people reading the code when the return value
460 is backwards (0 is success).
461 - fix Makefile.PL (more) so that detection of gettimeofday is
464 1.19 has better VMS support.
466 1.18 Mon Jul 6 22:40 1998
467 - add usleep() for Win32.
468 - fix Makefile.PL to fix reported HP/UX feature where unresolved
469 externals still cause an executable to be generated (though no
470 x bit set). Thanks to David Kozinn for report and explanation.
471 Problems with the fix are mine :)
473 1.18 has limited Win32 support (no ualarm). Added usleep for Win32.
474 Probably buggy. I'm sure I'll hear.
476 1.17 Wed Jul 1 20:10 1998
477 - fix setitimer calls so microseconds is not more than 1000000.
478 Hp/UX 9 doesn't like that. Provided by Roland B Robert, PhD.
479 - make Win32. We only get gettimeofday (the select hack doesn't
480 seem to work on my Win95 system).
481 - fix test 4 on 01test.t. add test to see if time() and
482 Time::HiRes::time() are close.
484 1.16 Wed Nov 12 21:05 1997
485 - add missing EXTEND in new gettimeofday scalar code.
487 1.16+ should be closer to building out of the box on Linux. Thanks
488 to Gisle Aas for patches, and the ualarm equivalent using setitimer.
490 If your underlying operating system doesn't implement ualarm(), then
491 a fake using setitimer() will be made. If the OS is missing usleep(),
492 a fake one using select() will be made. If a fake can't be made for
493 either ualarm() or usleep(), then the corresponding Perl function will
494 not be available. If the OS is missing gettimeofday(), you will get
495 unresolved externals, either at link- or run-time.
497 This is an improvement; the package used to not even build if
498 you were missing any of these bits. Roderick Schertler
500 <roderick@argon.org> did all the conditional compilation stuff,
501 look at HiRes.pm and the test suites; it's good educational reading.
503 1.15 Mon Nov 10 21:30 1997
504 - HiRes.pm: update pod. Provided by Gisle Aas.
505 - HiRes.xs: if gettimeofday() called in scalar context, do
506 something more useful than before. Provided by Gisle Aas.
507 - README: tell of xsubpp '-nolinenumber' woes. thanks to
508 Edward Henigin <ed@texas.net> for pointing out the problem.
510 1.14 Wed Nov 5 9:40 1997
511 - Makefile.PL: look for setitimer
512 - HiRes.xs: if missing ualarm, but we have setitimer, make up
513 our own setitimer. These were provided by Gisle Aas.
515 1.13 Tue Nov 4 23:30 1997
516 - Makefile.PL: fix autodetect mechanism to do try linking in addition
517 to just compiling; should fix Linux build problem. Fix was provided
520 1.12 Sun Oct 12 12:00:00 1997
521 - Makefile.PL: set XSOPT to '-nolinenumbers' to work around xsubpp bug;
522 you may need to comment this back out if you have an older xsubpp.
523 - HiRes.xs: set PROTOTYPES: DISABLE
525 1.11 Fri Sep 05 16:00:00 1997
527 Had some line commented out that shouldn't have been (testing
530 Previous version was corrupted.
532 1.10 Thu May 22 20:20:00 1997
533 - HiRes.xs, HiRes.pm, t/*:
534 - only compile what we have OS support for (or can
536 - only test what we compiled
537 - gross improvement to the test suite
539 This work was all done by Roderick Schertler
540 <roderick@argon.org>. If you run Linux or
541 one of the other ualarm-less platoforms, and you like this
542 module, let Roderick know; without him, it still wouldn't
543 be working on those boxes...
544 - Makefile.PL: figure out what routines the OS has and
545 only build what we need. These bits were written by Jarkko
546 Hietaniemi <jhi@iki.fi>. Again, gratitude is due...
548 1.02 Mon Dec 30 08:00:00 1996
549 - HiRes.pm: update documentation to say what to do when missing
550 ualarm() and friends.
551 - README: update to warn that ualarm() and friends need to exist
553 1.01 Fri Oct 17 08:00:00 1996
554 - Makefile.PL: make XSPROTOARGS => '-noprototyopes'
555 - HiRes.pm: put blank line between __END__ and =head1 so that
558 1.00 Tue Sep 03 13:00:00 1996
559 - original version; created by h2xs 1.16