I am referring to this forum and the explanation about timeradd (3) where is written
"timercmp() compares a to b using the comparison operator given in CMP, and returns the
result of that comparison." I could not find any example for this kind of macro. It sounds
easy, comparing a to b, at first sight.
My attempt so far is this, but is there anyone who could give me an example with the above
timercmp () ??? Thanks in advance.
function timer
{
FINISH_TIME=`date +%s`
SECONDS=$((FINISH_TIME - START_TIME))
if [ "$SECONDS" -gt "$TIME_LIMIT" ]; then
notify-send "limit reached..." \ "Disconnect"
disconnect
fi
}