- or download this
ps -ef "%t %c"
29:23 swdmgr
3-09:32:03 RIM_Oracle_prog
07:13:13 ksh
- or download this
my ($days, $hours, $min, $secs);
if ($time=~/(\d+)-(\d{2}):(\d{2}):(\d{2})/){
...
my $hour_sec=$hours*3600;
my $min_sec=$mins*60;
my $secs_running=$day_sec+$hour_sec+$min_sec+$secs;
- or download this
my $age; # age in seconds
$age = $1 * 86400 if $time =~ s/(\d+)-//; # add days if there
...
for (reverse split /:/, $time) { # fun way to convert to seconds
$age += $_ * shift @mult; # he he he :-)
}