From a7402a480aca41f21d95795297d713f7c39740d7 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 11 Oct 2024 21:34:26 +0200 Subject: fix timerep --- .local/share/bin/timerep | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to '.local/share/bin/timerep') 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) -- cgit v1.2.3