in reply to Module(s) for Manipulating Elapsed Time
The reason for those leading 0's in the reverse() function are left as an exercise to the reader. :)# accepts the following forms: # HH:MM:SS.ss MM:SS.ss SS.ss HH:MM:SS MM:SS SS sub time2sec { my ($s,$m,$h) = reverse(0, 0, split /:/, shift) return 3600*$h + 60*$m + $s; }
|
|---|