From ced5ba83e879b94413c1db90bb388d9c128609d4 Mon Sep 17 00:00:00 2001 From: lejubila Date: Tue, 30 May 2017 23:51:39 +0200 Subject: [PATCH] aggiunto tempo di attesa random su funzione lock per impedire sovrapposizioni concorrenti --- piGarden.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/piGarden.sh b/piGarden.sh index 8de232b..e881595 100755 --- a/piGarden.sh +++ b/piGarden.sh @@ -1418,6 +1418,8 @@ list_descendants () # function lock { + sleep 0.$((100 * $RANDOM / 32767)) | sed 's/..$/.&/' + local max_time=10 local current_time=$(($1 + 1))