aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin/timerep
diff options
context:
space:
mode:
Diffstat (limited to '.local/share/bin/timerep')
-rwxr-xr-x.local/share/bin/timerep9
1 files changed, 8 insertions, 1 deletions
diff --git a/.local/share/bin/timerep b/.local/share/bin/timerep
index c6b44ee..e09d6c1 100755
--- a/.local/share/bin/timerep
+++ b/.local/share/bin/timerep
@@ -47,6 +47,13 @@ function printpath(new_path, new, i) {
}
}
+function timefmt(time, fmt) {
+ cmd = sprintf("timefmt %s", time)
+ cmd | getline fmt
+ close(cmd)
+ return fmt
+}
+
{
len = split($1, path, "::")
for (i = 1; i <= len; i++)
@@ -56,7 +63,7 @@ function printpath(new_path, new, i) {
delete path[len]
depth = len - 1
sum += $2
- "timefmt "$2 | getline duration
+ duration = timefmt($2)
printpath(path)
printf("%-67s %10s\n", indent(depth) task, duration)