Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Formatting elapsed time

by Hofmator (Curate)
on Sep 06, 2001 at 17:34 UTC ( [id://110568]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        $res .= sprintf "%dw", $weeks   if $weeks;
        $res .= sprintf "%dd", $days    if $days;
        $res .= sprintf "%dh", $hours   if $hours;
        $res .= sprintf "%dm", $minutes if $minutes;
        $res .= sprintf '%ds', $seconds;
    
  2. or download this
     $res .= sprintf "%dw", $weeks   if                                $we
    +eks;
     $res .= sprintf "%dd", $days    if                       $days or $we
    +eks;
     $res .= sprintf "%dh", $hours   if             $hours or $days or $we
    +eks;
     $res .= sprintf "%dm", $minutes if $minutes or $hours or $days or $we
    +eks;
     $res .= sprintf '%ds', $seconds;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-19 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found