diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-11 21:34:26 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-11 21:34:26 +0200 |
commit | a7402a480aca41f21d95795297d713f7c39740d7 (patch) | |
tree | 59e023c35fdfb3e3882c4a1c58614edecc770815 /.local/share/bin/timerep | |
parent | 6e57b6d76c25968bb66f11a655c3bd1d20c33041 (diff) |
fix timerep
Diffstat (limited to '.local/share/bin/timerep')
-rwxr-xr-x | .local/share/bin/timerep | 9 |
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) |