“Professional service
that won't make you nervous”

Macintosh  Perl  Linux


Perl extension for monitoring time conveniently during tasks

Current Version: 1.24_02 -- see CHANGES file for details.

Download the documentation in PDF format (basically duplicates the html docs below, but prettier.)

View the current CPAN distribution.

View the README file


  • Perl 5.6.1 or later
  • The Time::HiRes module must be installed

Additional documentation is available as part of the package.


Time::Elapse is a very simple class with one method: lapse.

Basically, the lapse method 'eats the brains' of the variable, squirrels away whatever value it may have held internally, (much like space aliens are known to do in the movies), and also stores the current time within it. Then, whenever you access the value of the variable, the 'alien' within formats the time differential between when you initialized the variable, and when you printed it, and returns that (along with any value the variable may hold, as well). :-) Every time you print it, you get the updated differential, returned by the method hidden inside the variable itself. The output will be formatted as HH:MM:SS.000000 [in Microseconds].

Frankly it doesn't do much more than time(), but then again the simplest things rarely do. :-)

All it really does is hides the calculations that anyone else would have had to set up manually in a clever way and then produce a reasonably formatted output which lends itself equally well to single-line output or inlining with other text.


Copyright (c) 2001 Scott R. Godin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.