This commit is contained in:
Cyberes 2024-03-30 20:52:53 -06:00
parent 60e76d755d
commit c1fb13bad0
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ fi
start_time=$(systemctl show "$UNIT_NAME" --property=ExecMainStartTimestamp --value) start_time=$(systemctl show "$UNIT_NAME" --property=ExecMainStartTimestamp --value)
end_time=$(systemctl show "$UNIT_NAME" --property=ExecMainExitTimestamp --value) end_time=$(systemctl show "$UNIT_NAME" --property=ExecMainExitTimestamp --value)
current_time=$(date +%s) current_time=$(date +%s)
start_time_diff="undefined" start_time_diff_perf=""
end_time_diff="undefined" end_time_diff_perf=""
if [ -n "$start_time" ] && [ "$start_time" != "n/a" ]; then if [ -n "$start_time" ] && [ "$start_time" != "n/a" ]; then
start_time_diff=$((current_time - $(date -d "$start_time" +%s))) start_time_diff=$((current_time - $(date -d "$start_time" +%s)))