
if test -f GetTime.cpp
then
   rm GetTime.cpp
fi

echo "does anybody really know what time it is?"


sh RemoveProg TestGetTime
echo $1 -o TestGetTime TestGetTime.cpp GetTime1.cpp $2  >> "CheckFeatures.log" 2>&1
$1 -o TestGetTime TestGetTime.cpp GetTime1.cpp $2 >> "CheckFeatures.log" 2>&1

if test -f TestGetTime
then
if ./TestGetTime 1 1048576 1048575 >> "CheckFeatures.log" 2>&1
then
cp GetTime1.cpp GetTime.cpp
echo "using GetTime1.cpp"
exit 0
fi
fi


sh RemoveProg TestGetTime
echo $1 -o TestGetTime TestGetTime.cpp GetTime2.cpp $2  >> "CheckFeatures.log" 2>&1
$1 -o TestGetTime TestGetTime.cpp GetTime2.cpp $2  >> "CheckFeatures.log" 2>&1

if test -f TestGetTime
then
if ./TestGetTime 1 1048576 1048575 >> "CheckFeatures.log" 2>&1
then
cp GetTime2.cpp GetTime.cpp
echo "using GetTime2.cpp"
exit 0
fi
fi

sh RemoveProg TestGetTime
echo $1 -o TestGetTime TestGetTime.cpp GetTime3.cpp $2  >> "CheckFeatures.log" 2>&1
$1 -o TestGetTime TestGetTime.cpp GetTime3.cpp $2  >> "CheckFeatures.log" 2>&1

if test -f TestGetTime
then
if ./TestGetTime 1 1048576 1048575 >> "CheckFeatures.log" 2>&1
then
cp GetTime3.cpp GetTime.cpp
echo "using GetTime3.cpp"
exit 0
fi
fi

sh RemoveProg TestGetTime
echo $1 -o TestGetTime TestGetTime.cpp GetTime4.cpp $2  >> "CheckFeatures.log" 2>&1
$1 -o TestGetTime TestGetTime.cpp GetTime4.cpp $2  >> "CheckFeatures.log" 2>&1


if test -f TestGetTime
then
if ./TestGetTime 1 1048576 1048575 >> "CheckFeatures.log" 2>&1
then
cp GetTime4.cpp GetTime.cpp
echo "using GetTime4.cpp"
exit 0
fi
fi

sh RemoveProg TestGetTime
echo $1 -o TestGetTime TestGetTime.cpp GetTime5.cpp $2  >> "CheckFeatures.log" 2>&1
$1 -o TestGetTime TestGetTime.cpp GetTime5.cpp $2  >> "CheckFeatures.log" 2>&1


if test -f TestGetTime
then
cp GetTime5.cpp GetTime.cpp
echo "using GetTime5.cpp"
echo "warning: this GetTime function always returns 0"
exit 0
else
echo "something is wrong..."
exit 1
fi

