diff options
| author | wukong <wukong@longaeva> | 2026-11-25 03:29:26 -0800 |
|---|---|---|
| committer | wukong <wukong@longaeva> | 2026-11-25 03:29:26 -0800 |
| commit | 9cabccd75fedbee0d3ae3646833410d775f6b956 (patch) | |
| tree | 3fe4e8d8758e871ce0047b6247c2c2932b905072 /ckdate.sh | |
| parent | ffa420cc9ecccc284510cac40456146be5c918a9 (diff) | |
changed from for loop to while loop;
added check for change in 'update' output string;
Diffstat (limited to '')
| -rw-r--r-- | ckdate.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ckdate.sh b/ckdate.sh new file mode 100644 index 0000000..b47117c --- /dev/null +++ b/ckdate.sh @@ -0,0 +1,18 @@ + +# set -x +set -e + +t2=$( perl -m 'Time::HiRes' -e 'print(Time::HiRes::time())' ) +t0=$( date +%s ) +t1=$( date +%s ) +t3=$( perl -m 'Time::HiRes' -e 'print(Time::HiRes::time())' ) + +# t2=$( sqlite3 ':memory:' "select 86.4E3 * (julianday('now') - julianday('1970-01-01'));" ) +# t3=$( sqlite3 ':memory:' "select 86.4E3 * (julianday('now') - julianday('1970-01-01'));" ) + +t4=$( perl -m 'Time::HiRes' -e 'print(Time::HiRes::time())' ) +t5=$( perl -m 'Time::HiRes' -e 'print(Time::HiRes::time())' ) + +echo ${t0} ${t1} ${t2} ${t3} ${t4} ${t5} |\ + awk '{ print($2 - $1, $4 - $3, $6 - $5) }' + |
