summaryrefslogtreecommitdiffstats
path: root/tests/tier.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tier.rc')
-rw-r--r--tests/tier.rc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tier.rc b/tests/tier.rc
index 3fa6af6a40f..4fd24de0659 100644
--- a/tests/tier.rc
+++ b/tests/tier.rc
@@ -99,3 +99,16 @@ function confirm_vol_stopped {
fi
}
+
+function sleep_first_cycle {
+ startTime=$(date +%s)
+ mod=$(( ( $startTime % $1 ) + 1 ))
+ sleep $mod
+}
+
+function sleep_until_mid_cycle {
+ startTime=$(date +%s)
+ mod=$(( ( $startTime % $1 ) + 1 ))
+ mod=$(( $mod + $1 / 2 ))
+ sleep $mod
+}