TIMTOWTDY... ;-)
# file Secs.pm package Secs; use base Math::BigInt; use overload '""' => \&as_string, fallback => 1; sub as_string { my $h = int $_[0]/3600; my $m = int(($_[0]-$h*3600)/60); sprintf "%d:%02d:%02d",$h,$m,$_[0]-$h*3600-$m*60; } 1;
use Secs; print Secs->new($end - $start),"\n";
In reply to Re: Subtract two timestamps
by shmem
in thread Subtract two timestamps
by sandy1028
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |