Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.138.295 Times

Time::Elapse 1.2402

  Date Added: May 08, 2010  |  Visits: 886

Time::Elapse

Report Broken Link
Printer Friendly Version


Product Homepage
Download (111 downloads)



Time::Elapse is a Perl extension for monitoring time conveniently during tasks. 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 doesnt 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. SYNOPSIS Usage To use Elapse is simplicity itself: use Time::Elapse; # somewhere in your program... Time::Elapse->lapse(my $now); # or you can do: # Time::Elapse->lapse(my $now = "processing"); #...rest of program execution print "Time Wasted: $nown"; To update the description and reset the time counter mid-stream, simply assign to the variable $now = "parsing"; somewhere in the middle of the program. The new value is stored, while the original time is replaced with the current time. Sample Output Output looks something like this, using above code: Time Wasted: 00:00:05.565763 or Time Wasted: 00:00:03.016700 [processing] (more output) Time Wasted: 00:00:02.003764 [parsing] Additional example code You can also use this during a Net::FTP download loop of files to show elapsed time for each files download. foreach my $file (@files_to_download) { # extract localfile name from $file # ... Time::Elapse->lapse(my $now = "Downloading $localfile."); $ftp->get($file, $localfile) or carp("### Could not download $file! $!") and next; print "Done. Elapsed : $nown"; # ... } This can also be a useful trick when youre processing a lot of data from multiple sources..

Requirements: No special requirements
Platforms: Linux
Keyword: Lapse Libraries Output Perl Programming Time Time Wasted Timeelapse Value Variable
Users rating: 0/10

License: Freeware Size: 7.17 KB
USER REVIEWS
More Reviews or Write Review


TIME::ELAPSE RELATED
Network & Internet  -  mod_perl 2.0.3
mod_perl project brings together the full power of the Perl programming language and the Apache HTTP server. You can use Perl to manage Apache, respond to requests for web pages and much more. mod_perl gives you a persistent Perl interpreter...
3.5 MB  
Libraries  -  Data::Type 0.01.04
Data::Type is a Perl module with versatile data and value types. SYNOPSIS use Data::Type qw(:all); use Error qw(:try); try { verify $email , EMAIL; verify $homepage , URI(http); verify $cc , CREDITCARD( MASTERCARD, VISA ); verify...
22.53 KB  
Libraries  -  CGI::Cache 1.4200
CGI::Cache is a Perl extension to help cache output of time-intensive CGI scripts. WARNING The interface as of version 1.01 has changed considerably and is NOT compatible with earlier versions. A smaller interface change also occurred in...
44.03 KB  
Utilities  -  Perl OS 4
Perl OS is a program written in the Perl programming language combined with the Perl module Tk. Perl OS was created to make an easy interface to run Perl/Tk programs. It was also created to be an easy working environment complete with a text...
143.36 KB  
Networking Tools  -  sshdfilter 1.5.4
sshdfilter automatically blocks ssh brute force attacks by reading sshd log output in real time and adding iptables rules based on authentication failures. Block rules are created by logging on with an invalid user name, or wrongly guessing the...
17.41 KB  
Libraries  -  Test::Data 1.20
Test::Data is a Perl module to test functions for particular variable types. SYNOPSIS use Test::Data qw(Scalar Array Hash Function); Test::Data provides utility functions to check properties and values of data and variables. Functions...
8.19 KB  
Libraries  -  CGI::FastTemplate 1.09
CGI::FastTemplate is a Perl extension for managing templates, and performing variable interpolation. SYNOPSIS use CGI::FastTemplate; $tpl = new CGI::FastTemplate(); $tpl = new CGI::FastTemplate("/path/to/templates");...
13.31 KB  
Libraries  -  App::SimpleScan::Plugin::Forget 1.02
App::SimpleScan::Plugin::Forget is a Perl module to forget a variables value. SYNOPSIS # In a simple_scan input file, after installing this module: # Define the variable foo: %%var foo baz bar quux # Later in the file: %%forget foo #...
4.1 KB  
Programming  -  Acme::BOPE 0.01
Created at the base of the hill of Babylon, New York, in full evening of funk, this module allows you to make inroads Perl programming using just jargon and language taken from the famous movie "Elite Squad" director Jose Padilha
10.24 KB  
Web Authoring  -  WebAPP 1.0 SE
WebAPP is a popular, open source Content Management System (cms) written in the Perl programming language. The name WebAPP is an abbreviation of Web Automated Perl Portal. Available under the GNU General Public License, WebAPP is free software....
2 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB