sxmo_timer.sh: finish as soon as it get killed
Without this, the script will wait the full second before handling the kill signal.
This commit is contained in:
@@ -37,7 +37,8 @@ timerrun() {
|
|||||||
DATE1="$(($(date +%s) + TIME))";
|
DATE1="$(($(date +%s) + TIME))";
|
||||||
while [ "$DATE1" -gt "$(date +%s)" ]; do
|
while [ "$DATE1" -gt "$(date +%s)" ]; do
|
||||||
printf "%s\r" "$(date -u --date @$((DATE1 - $(date +%s))) +%H:%M:%S)";
|
printf "%s\r" "$(date -u --date @$((DATE1 - $(date +%s))) +%H:%M:%S)";
|
||||||
sxmo_aligned_sleep 1
|
sxmo_aligned_sleep 1 &
|
||||||
|
wait $!
|
||||||
done
|
done
|
||||||
echo "Done with $*"
|
echo "Done with $*"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user