Improve stat tracking
This commit is contained in:
parent
88997e7a23
commit
6304235dc4
1 changed files with 10 additions and 11 deletions
|
@ -4,9 +4,17 @@
|
||||||
# stats
|
# stats
|
||||||
###
|
###
|
||||||
|
|
||||||
|
export LAST_RELOAD
|
||||||
|
printf -v LAST_RELOAD '%(%s)T' -1
|
||||||
|
|
||||||
if [[ ! -v START_TIME ]]; then
|
if [[ ! -v START_TIME ]]; then
|
||||||
export START_TIME
|
export START_TIME=$LAST_RELOAD
|
||||||
printf -v START_TIME '%(%s)T' -1
|
fi
|
||||||
|
|
||||||
|
if [[ ! -v LONGEST_LIFE ]]; then
|
||||||
|
export LONGEST_LIFE=0
|
||||||
|
elif (( LONGEST_LIFE < SECONDS )); then
|
||||||
|
export LONGEST_LIFE=$SECONDS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -v RELOADED ]]; then
|
if [[ -v RELOADED ]]; then
|
||||||
|
@ -15,15 +23,6 @@ else
|
||||||
export RELOADED=0
|
export RELOADED=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export LAST_RELOAD
|
|
||||||
printf -v LAST_RELOAD '%(%s)T' -1
|
|
||||||
|
|
||||||
if [[ ! -v LONGEST_LIFE ]]; then
|
|
||||||
export LONGEST_LIFE=0
|
|
||||||
elif (( LONGEST_LIFE < SECONDS )); then
|
|
||||||
export LONGEST_LIFE=$SECONDS
|
|
||||||
fi
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# switch toggler
|
# switch toggler
|
||||||
###
|
###
|
||||||
|
|
Loading…
Reference in a new issue