I am using File::Find on some small and some very large filesystems, 30Gb for example. I could use the Unix time binary to give me total time elapsed.
The units would be the number of files to look at for a specified size in any one filesystem
I could adjust the expected time, something solid is ideal but "something" is desired, maybe a rough estimate???
The interface for times lapsed and time to completed is OK to look like
nothing fancy. Does min and max represent seconds here ? $timer->attr( min => 0, max => 100 ).Elapsed Time: 0:20 min:sec, ########..........................20.0%
Is the for loop here used just for the printing of #s?
CPAN does not say:
min This is the min value of the items that will follow (used to calcu +late estimated finish time) max This is the max value of all items in the even (also used to calcu +late estimated finish time)
use strict ; use warnings ; use File::Find ; use Logfile::Rotate ; use Time::Progress ; $| = 1 ; ###-- autoflush to get \r working --### my $timer = new Time::Progress ; $timer->attr( min => 0, max => 100 ); $timer->restart; print "\n"; for my $incr ( 0 .. 20 ) { ###-- print progress bar and % done --## +# print $timer->report( "Elapsed Time: %L min:sec, %40b %p\r", $incr + ) ; sleep 1 ; } ### MAIN CODE HERE ### <snip> logroll ; ### END OF MAIN CODE ### ###-- stop timer --### $timer->stop ; ###-- report times --### print $timer->elapsed_str ;
thank you!
In reply to Re^2: Time modules
by mikejones
in thread Time modules
by mikejones
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |