I think Time::Progress is what I need or something similar. I am playing with it now. To answer your questions, IDK for sure.

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

Elapsed Time: 0:20 min:sec, ########..........................20.0%
nothing fancy. Does min and max represent seconds here ? $timer->attr( min => 0, max => 100 ).

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.