Q about Coro file::find

Aleksandar Lazic al-anyevent at none.at
Thu Feb 2 15:42:24 CET 2012


Dear Zsbán,

On 02-02-2012 12:10, Zsbán Ambrus wrote:
> On 2/1/12, Aleksandar Lazic <al-anyevent at none.at> wrote:
>> OT: Is there a better way to print the elapsed time then this?
>> POSIX::strftime("%T",Time::HiRes::time-$tgesammt ,0,0,0,0,0)
>
> That does work, but as you're asking about it, yes, it could be
> improved if you're pedantic.
>
> The first problem is that if your time duration is more than one day,
> this "%T" format will silently print the value only modulo one day.
> If this is a problem, one solution would be something like this 
> (where
> $dt is the number of seconds elapsed):
>
> use Date::Manip;
> print Delta_Format((0+$dt) . " sec", 0, "%02hyh:%02mmm:%02sss\n");

[snipp]

Many thanks for your detail explanation.

I have now installed Date::Manip ;-)

BR
Aleks



More information about the anyevent mailing list