summaryrefslogtreecommitdiff
path: root/ckcptime.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ckcptime.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/ckcptime.sh b/ckcptime.sh
index 697854b..466af59 100644
--- a/ckcptime.sh
+++ b/ckcptime.sh
@@ -3,18 +3,28 @@
# estimate sytem boot time
# [debug] enable execution tracing
-#set -x
+# set -x
set -e
# raw input data
#date +%s
#sysctl kern.cp_time | awk -F= '{print($0)}'
-#printf "sec\n" | column -t
-for N in $(seq 0 15) ; do
- #printf "${N} ${t0_est}\n" | column -t
- awk -f ckcptime.awk
- sleep $( awk 'BEGIN {print( rand()^2.0 + 1.0 )}' )
+t_prev='0'
+t_curr=$( date +%s )
+
+for N in $( seq 0 90 ) ; do
+ while [ $t_prev -eq $t_curr ] ; do
+ # sleep $( awk 'BEGIN {print(rand()^2.0 + rand()^2.0)}' )
+ # sleep 0.707107
+ sleep 1.41421
+ t_curr=$( date +%s )
+ done
+ if [ $t_prev -ne $t_curr ] ; then
+ awk -f ckcptime.awk
+ t_prev=$t_curr
+ fi
+
done
# [debug] disable execution tracing