#!/bin/sh
# Copyright 1999-2002 Carnegie Mellon University.  
# Portions Copyright 2002 Sun Microsystems, Inc.  
# Portions Copyright 2002 Mitsubishi ElectricResearch Laboratories.
# All Rights Reserved.  Use is subject to license terms.
# 
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL 
# WARRANTIES.
#
#
# waits for the given file to appear
#
# usage:  waitForFile filename
#
#


regressionDir=.
startWaitTime=`$regressionDir/getTime`

until test -f $1
do
     sleep 3
done

endWaitTime=`$regressionDir/getTime`
totalWaitTime=`expr $endWaitTime - $startWaitTime`

echo "waitForFile $1: waited for $totalWaitTime seconds"
