If you want to use plain bash, go with arrays.
First create an array from your file
Code:
while read line
do
array+=("$line")
done < FileIn.txt
Loop through the array, and use your formula
Code:
for (( i = 0 ; i < $((${#array[@]}-1)) ; i++ ))
do
#Your formula
done
For example to compare if time between each consecutive line is less then 90 seconds
Code:
if [ $((${array[$i]}+90)) -lt ${array[$(($i + 1))]} ] ;then
echo "${array[i]}"
fi