Class::Easy::Timer - really easy timer


Class-Easy documentation  | view source Contained in the Class-Easy distribution.

Index


NAME

Top

Class::Easy::Timer - really easy timer

ABSTRACT

Top

SYNOPSIS

Top

SYNOPSIS

	use Class::Easy;

	# timer doesn't run without properly configured logger
	logger ('default')->appender (*STDERR);

	$t = timer ('sleep one second');

	sleep (1);

	my $interval = $t->lap ('one more second'); # $interval == 1

	warn "your system have bad timer: 1s = ${interval}s"
		if $interval < 1;

	sleep (1);

	$interval = $t->end; # $interval == 1

	warn "your system have bad timer: 1s = ${interval}s"
		if $interval < 1;

	$interval = $t->total; # $interval == 2




METHODS

Top

new

create timer, start new lap and return timer object

lap

get lap duration and start a new lap

end

get duration for last lap

total

get duration between timer creation and end call

AUTHOR

Top

Ivan Baktsheev, <apla at the-singlers.us>

BUGS

Top

Please report any bugs or feature requests to my email address, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Easy. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


Class-Easy documentation  | view source Contained in the Class-Easy distribution.