AlignDB::Stopwatch - Record running time and print standard messages
use AlignDB::Stopwatch;
# record command line
my $stopwatch = AlignDB::Stopwatch->new->record;
# record config
$stopwatch->record_conf($opt);
$stopwatch->start_message("Doing really bad things...");
$stopwatch->end_message;
program name
program command line options
program configurations
start time
Divider char used in output messages, default is [=]
Length of divider char, default is [30]
minimal single-side divider length, default is [5]
Use Data::UUID to generate a UUID that prevent inserting meta info more than one time on multithreads mode
Record $main::0 to program_name and [@main::ARGV] to program_argv.
Getopt::Long would manipulate @ARGV.
my $stopwatch = AlignDB::Stopwatch->new->record;
Record a hashref or object to program_conf.
$stopwatch->record_conf( $opt );
Print a blocked message
$stopwatch->block_message( $message, $with_duration );
Print a starting message
$stopwatch->start_message( $message, $embed_in_divider );
Print a ending message
$stopwatch->end_message( $message );
Qiang Wang <wang-q@outlook.com>
This software is copyright (c) 2008- by Qiang Wang.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.