Commit f1d4986b authored by Mark Andrews's avatar Mark Andrews
Browse files

treat asb(x) < 500ms as 0

parent 2ca3a2b6
......@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.25 2011/05/02 05:05:05 marka Exp $
# $Id: tests.sh,v 1.26 2011/05/02 23:56:59 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
......@@ -897,9 +897,15 @@ check_interval () {
awk -F: '
{
x = ($6+ $5*60000 + $4*3600000) - ($3+ $2*60000 + $1*3600000);
# abs(x) < 500 ms treat as 'now'
if (x < 500 && x > -500)
x = 0;
# convert to seconds
x = x/1000;
# handle end of day roll over
if (x < 0)
x = x + 24*3600;
# handle log timestamp being a few milliseconds later
if (x != int(x))
x = int(x + 1);
if (int(x) > int(interval))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment