repo.or.cz
/
GalaxyCodeBases.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
modified: Makefile
[GalaxyCodeBases.git]
/
perl
/
etc
/
addtime.pl
blob
96401c24c8c826127dd9e2df282facebb32584d2
1
#!/bin/env perl
2
use
strict
;
3
use
warnings
;
4
5
die
"Usage:
$0
<time ??m?.?s>
\n
"
if
@ARGV
<
1
;
6
7
my
$totalsec
=
0
;
8
9
while
(
$_
=
shift
@ARGV
) {
10
print
"[
$_
]: "
;
11
/((\d+)m)?([.\d]+)s/
or
(
print
"NULL
\n
"
and
next
);
12
#print "$1, $2, $3\n";
13
my
$sec
;
14
if
(
defined
$1
) {
15
$sec
+=
$2
*
60
;
16
}
17
$sec
+=
$3
;
18
print
"
$sec
s
\n
"
;
19
$totalsec
+=
$sec
;
20
}
21
print
"Total:
$totalsec
s
\n
"
;
22