Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re:x2 Formatting elapsed time

by grinder (Bishop)
on Sep 06, 2001 at 17:38 UTC ( #110569=note: print w/ replies, xml ) Need Help??


in reply to Re: Formatting elapsed time
in thread Formatting elapsed time

Yes they could, but it would change the behaviour of the routine. For instance, 86401 would produce 1d1s instead of 1d0h0m1s.

Which may be what you want (ultra-compact!), but it wasn't what I needed.

update: re your update: you're quite right. Adding the $res into the format string is a bit too clever by half. I completely overlooked .= . It's feedback like this that make Perl Monks such a useful site.

--
g r i n d e r


Comment on Re:x2 Formatting elapsed time

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://110569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-04-25 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (479 votes), past polls