summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-05-24 21:22:02 +0200
committerJakob Unterwurzacher2016-05-24 21:22:02 +0200
commit432c94da01fd47bda6ad9297f44d8119a4053ed3 (patch)
tree7efa23a8eef5bdd86acacf2010361fbd3c679e6b
parentb467e7509e367f11784c20cb9ac8eef3c74c7468 (diff)
extractloop: use $SECONDS special variable
Gets rid of the call to "date" and simplifies the code.
-rwxr-xr-xstress_tests/extractloop.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/stress_tests/extractloop.bash b/stress_tests/extractloop.bash
index cb67707..c488707 100755
--- a/stress_tests/extractloop.bash
+++ b/stress_tests/extractloop.bash
@@ -40,11 +40,11 @@ function loop {
N=1
while true
do
- t1=$(date +%s)
+ t1=$SECONDS
tar xf /tmp/linux-3.0.tar.gz
md5sum --status -c $MD5
rm -Rf linux-3.0
- t2=$(date +%s)
+ t2=$SECONDS
delta=$((t2-t1))
echo "[pid $BASHPID] Iteration $N done, $delta seconds"
let N=$N+1