NAME

Lab::Moose::Countdown - Verbose countdown/delay with pretty printing of remaining time

VERSION

version 3.860

SYNOPSIS

use Lab::Moose::Countdown;

# Sleep for 23.45678 seconds with pretty countdown
countdown(23.45678, "Getting ready, Remaining time is ");

FUNCTIONS

countdown

my $delay = 2 # seconds
countdown($delay)

my $prefix = "Some prefix text";
countdown($delay, $prefix);

Replacement for Time::HiRes::sleep. Pretty print the remaining hours/minutes/seconds. If the argument is smaller than 0.5 seconds, no countdown is printed and the function behaves exactly like Time::HiRes::sleep. Default $prefix is "Sleeping for".

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by the Lab::Measurement team; in detail:

Copyright 2018       Simon Reinhardt
          2020       Andreas K. Huettel, Simon Reinhardt

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.